From f07c42a322f41e14ef5b1bf8f2fd66fc5d338cdd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 28 六月 2023 18:17:09 +0800
Subject: [PATCH] 2023-06-28

---
 src/menu/components/tabs/paste/index.jsx |   27 ++++++++++-----------------
 1 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/src/menu/components/tabs/paste/index.jsx b/src/menu/components/tabs/paste/index.jsx
index d8ae618..be4a281 100644
--- a/src/menu/components/tabs/paste/index.jsx
+++ b/src/menu/components/tabs/paste/index.jsx
@@ -19,39 +19,32 @@
     visible: false
   }
 
-  handleMenuClick = () => {
-    this.setState({visible: true})
-  }
-
-  resetconfig = (item, uuids = {}) => {
+  resetconfig = (item, appType) => {
     if (item.type === 'tabs') {
-      uuids[item.uuid] = MenuUtils.getuuid()
-      item.uuid = uuids[item.uuid]
+      item.uuid = MenuUtils.getuuid()
       item.setting.name = item.setting.name + MenuUtils.getSignName()
       item.name = item.setting.name
       
       item.subtabs.forEach(tab => {
-        uuids[tab.uuid] = MenuUtils.getuuid()
-        tab.uuid = uuids[tab.uuid]
+        tab.uuid = MenuUtils.getuuid()
 
         tab.components = tab.components.map(cell => {
-          cell = this.resetconfig(cell, uuids)
+          cell = this.resetconfig(cell, appType)
           return cell
         })
       })
     } else if (item.type === 'group') {
-      uuids[item.uuid] = MenuUtils.getuuid()
-      item.uuid = uuids[item.uuid]
+      item.uuid = MenuUtils.getuuid()
       item.setting.name = item.setting.name + MenuUtils.getSignName()
       item.name = item.setting.name
 
       item.components = item.components.map(cell => {
-        cell = MenuUtils.resetComponentConfig(cell, uuids)
+        cell = MenuUtils.resetComponentConfig(cell, appType)
 
         return cell
       })
     } else {
-      item = MenuUtils.resetComponentConfig(item, uuids)
+      item = MenuUtils.resetComponentConfig(item, appType)
     }
 
     return item
@@ -60,7 +53,7 @@
   pasteSubmit = () => {
     const { Tab } = this.props
     let appType = sessionStorage.getItem('appType')
-    let options = ['tabs', 'group', 'datacard', 'propcard', 'timeline', 'balcony', 'normaltable', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter', 'chart', 'sandbox']
+    let options = ['tabs', 'group', 'datacard', 'propcard', 'timeline', 'balcony', 'normaltable', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'editor', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'sandbox']
     let types = {
       login: '鐧诲綍',
       navbar: '瀵艰埅鏍�',
@@ -70,7 +63,7 @@
     if (appType === 'mob') {
       options.push('menubar')
     } else {
-      options.push('editable')
+      options.push('editable', 'antvG6', 'antvX6', 'tree', 'dashboard', 'chart')
     }
 
     this.pasteFormRef.handleConfirm().then(res => {
@@ -90,7 +83,7 @@
         return
       }
 
-      res = this.resetconfig(res, {})
+      res = this.resetconfig(res, appType)
 
       delete res.copyType
       

--
Gitblit v1.8.0