copyText (text) {
let input = document.createElement('input');
let body = document.querySelector('body');
body.appendChild(input);
input.value = text; // 修改文本框的内容
input.select(); // 选中文本
document.execCommand('copy'); // 执行浏览器复制命令
body.removeChild(input);
this.$message({ //提示,可用自己使用的框架提示写法
message: '复制成功',
type: 'success',
});
s},
写法:@click="copyText('1111111111111111')"