其实就是把值赋给一个创建的节点选中
copyUrl('string')
copyUrl(url) {
var domUrl = document.createElement("input");
domUrl.value = url;
domUrl.id = "creatDom";
document.body.appendChild(domUrl);
domUrl.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
let creatDom = document.getElementById("creatDom");
creatDom.parentNode.removeChild(creatDom);
alert("已复制好,可贴粘。");
}