<div>{{orderNumber}}<span @click="copy(orderNumber)">复制</span></div>
copy(orderNumber){
console.log('复制')
let url = orderNumber;
let oInput = document.createElement('input');
oInput.value = url;
document.body.appendChild(oInput);
oInput.select();
document.execCommand("Copy");
this.$dialog.toast({ mes: "复制成功", timeout: 500 });
oInput.remove();
}
网友评论