Click the button to copy the corresponding connection.

1. Figure
Insert picture description here
2. Realization

{ {fuzhi }} { {wenhao }} { {idd }}

<button class="btn" @click="CopyUrl">Copy link

CopyUrl(){ this.fuzhi2 = this.fuzhi+this.wenhao+this.idd // This is my customized copy content console.log(this.fuzhi2) var Url2 = this.$refs.input1.value var oInput = document.createElement("input"); oInput.value = this.fuzhi2; //If you want to copy the content in input1, fill in Url2 here document.body.appendChild(oInput); oInput.select(); // select object document.execCommand("Copy"); // Execute browser copy command oInput.className = "oInput"; oInput.style.display = "none"; }










Guess you like

Origin blog.csdn.net/WQzeus/article/details/109910040