<el-button type="primary" plain @click="copyText(link)">复制内链</el-button>
// 点击复制
copyText(v) {
let oInput = document.createElement('input')
oInput.value = v
document.body.appendChild(oInput)
oInput.select()
document.execCommand("Copy")
this.$message.success('复制成功')
oInput.remove()
},
网友评论