点击按钮 复制内容到剪贴板上
通过点击事件将内容复制到剪贴板上
copyLink(text) { //外部传入复制内容
const input = document.createElement('input')
document.body.appendChild(input)
input.setAttribute('value', text)
input.select()
if (document.execCommand('copy')) {
document.execCommand('copy')
}
document.body.removeChild(input)
}

通过点击事件,将内容复制到剪贴板
浙公网安备 33010602011771号