From bd66cc7260cbb7bc672b29b31559263c43deb84a Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 4 Dec 2025 13:15:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A1=A8=E5=8D=95=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E5=85=B3=E9=97=AD=E9=A1=B5=E7=AD=BE=E9=94=80=E6=AF=81?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/tool/build/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/views/tool/build/index.vue b/ruoyi-ui/src/views/tool/build/index.vue index fe2ebeab6..889422b65 100644 --- a/ruoyi-ui/src/views/tool/build/index.vue +++ b/ruoyi-ui/src/views/tool/build/index.vue @@ -153,6 +153,7 @@ import DraggableItem from './DraggableItem' let oldActiveId let tempActiveData +let clipboard = null export default { components: { @@ -211,7 +212,7 @@ export default { } }, mounted() { - const clipboard = new ClipboardJS('#copyNode', { + clipboard = new ClipboardJS('#copyNode', { text: trigger => { const codeStr = this.generateCode() this.$notify({ @@ -226,6 +227,9 @@ export default { this.$message.error('代码复制失败') }) }, + beforeDestroy() { + clipboard.destroy() + }, methods: { activeFormItem(element) { this.activeData = element