复制功能
首先要获取相对应的链接
copyEvent () {
var textArea = document.createElement('textarea')
document.body.appendChild(textArea)
textArea.readOnly = 'readonly'
textArea.style.opacity = '0'
textArea.value = this.url //你的要被复制的链接
textArea.select()
if (textArea.setSelectionRange)
textArea.setSelectionRange(0, textArea.value.length)
else
textArea.select()
document.execCommand("copy")
this.$Message['success']({
background: true,
content: '链接已成功复制到剪贴板'
});
document.body.removeChild(textArea)
},