|
|
@@ -77,7 +77,7 @@ export default {
|
|
|
this.getTenantInfo();
|
|
|
},
|
|
|
mounted() {
|
|
|
- const clipboard = new ClipboardJS('.copy-btn', {
|
|
|
+ this.clipboard = new ClipboardJS('.copy-btn', {
|
|
|
text: trigger => {
|
|
|
this.$message({
|
|
|
message: '复制成功',
|
|
|
@@ -86,7 +86,7 @@ export default {
|
|
|
return this.tenantData.corpId;
|
|
|
}
|
|
|
})
|
|
|
- clipboard.on('error', e => {
|
|
|
+ this.clipboard.on('error', e => {
|
|
|
this.$message.error('复制失败')
|
|
|
})
|
|
|
},
|
|
|
@@ -109,6 +109,9 @@ export default {
|
|
|
console.log(this.tenantData);
|
|
|
})
|
|
|
},
|
|
|
+ },
|
|
|
+ destroyed() {
|
|
|
+ this.clipboard.destroy()
|
|
|
}
|
|
|
};
|
|
|
</script>
|