vue复制功能
/**复制版本号 */
copyVersion() {
if (this.versionInfo.webVersion) {
let content = "当前Web版本:" + this.versionInfo.webVersion;
let input = document.createElement("textarea");
input.value = content;
document.body.appendChild(input);
input.select();
let code = document.execCommand("copy");
input.className = "textarea";
input.style.display = "none";
if (code) {
this.$message.success("复制成功");
} else {
this.$message.error("复制失败,请重试");
}
} else {
this.$message.error("复制失败");
}
},