From 00e0dbbf98347b1e47a7e0aedd41baa61f7567ed Mon Sep 17 00:00:00 2001
From: fuyongxin <110568259@qq.com>
Date: Wed, 03 Jun 2026 08:47:03 +0800
Subject: [PATCH] 修改配置nacos,后端gateway端口

---
 ruoyi-ui/src/views/tool/build/index.vue |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/ruoyi-ui/src/views/tool/build/index.vue b/ruoyi-ui/src/views/tool/build/index.vue
index aa47759..26c7eec 100644
--- a/ruoyi-ui/src/views/tool/build/index.vue
+++ b/ruoyi-ui/src/views/tool/build/index.vue
@@ -146,13 +146,14 @@
 import { makeUpHtml, vueTemplate, vueScript, cssStyle } from '@/utils/generator/html'
 import { makeUpJs } from '@/utils/generator/js'
 import { makeUpCss } from '@/utils/generator/css'
-import drawingDefault from '@/utils/generator/drawingDefault'
+import { drawingDefaultValue, initDrawingDefaultValue, cleanDrawingDefaultValue } from '@/utils/generator/drawingDefault'
 import logo from '@/assets/logo/logo.png'
 import CodeTypeDialog from './CodeTypeDialog'
 import DraggableItem from './DraggableItem'
 
 let oldActiveId
 let tempActiveData
+let clipboard = null
 
 export default {
   components: {
@@ -171,16 +172,19 @@
       selectComponents,
       layoutComponents,
       labelWidth: 100,
-      drawingList: drawingDefault,
+      drawingList: drawingDefaultValue,
       drawingData: {},
-      activeId: drawingDefault[0].formId,
+      activeId: drawingDefaultValue[0].formId,
       drawerVisible: false,
       formData: {},
       dialogVisible: false,
       generateConf: null,
       showFileName: false,
-      activeData: drawingDefault[0]
+      activeData: drawingDefaultValue[0]
     }
+  },
+  beforeCreate() {
+    initDrawingDefaultValue()
   },
   created() {
     // 防止 firefox 下 拖拽 会新打卡一个选项卡
@@ -190,7 +194,6 @@
     }
   },
   watch: {
-    // eslint-disable-next-line func-names
     'activeData.label': function (val, oldVal) {
       if (
         this.activeData.placeholder === undefined
@@ -209,7 +212,7 @@
     }
   },
   mounted() {
-    const clipboard = new ClipboardJS('#copyNode', {
+    clipboard = new ClipboardJS('#copyNode', {
       text: trigger => {
         const codeStr = this.generateCode()
         this.$notify({
@@ -223,6 +226,9 @@
     clipboard.on('error', e => {
       this.$message.error('代码复制失败')
     })
+  },
+  beforeDestroy() {
+    clipboard.destroy()
   },
   methods: {
     activeFormItem(element) {
@@ -285,6 +291,7 @@
       this.$confirm('确定要清空所有组件吗?', '提示', { type: 'warning' }).then(
         () => {
           this.drawingList = []
+          cleanDrawingDefaultValue()
         }
       )
     },

--
Gitblit v1.9.3