html
<p v-clipboard:copy="message"
v-clipboard:success="onCopy"
v-clipboard:error="onError">
<span class="iconfont icon-lianjie"></span>
复制链接
</p>
js
message: window.location.href,
//复制url
onCopy: function(e) {
this.$message.success("复制成功!");
return;
},
//复制出错
onError: function(e) {
console.log("无法复制url!");
},