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

---
 src/menu/pastecontroller/index.jsx |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx
index d816e9d..5179037 100644
--- a/src/menu/pastecontroller/index.jsx
+++ b/src/menu/pastecontroller/index.jsx
@@ -18,9 +18,7 @@
     visible: false
   }
 
-  resetconfig = (item) => {
-    let appType = sessionStorage.getItem('appType')
-    
+  resetconfig = (item, appType) => {
     if (item.type === 'tabs') {
       item.uuid = MenuUtils.getuuid()
       item.setting.name = item.setting.name + MenuUtils.getSignName()
@@ -34,7 +32,7 @@
         }
 
         tab.components = tab.components.map(cell => {
-          cell = this.resetconfig(cell)
+          cell = this.resetconfig(cell, appType)
           return cell
         })
       })
@@ -44,11 +42,11 @@
       item.name = item.setting.name
 
       item.components = item.components.map(cell => {
-        cell = MenuUtils.resetComponentConfig(cell)
+        cell = MenuUtils.resetComponentConfig(cell, appType)
         return cell
       })
     } else {
-      item = MenuUtils.resetComponentConfig(item)
+      item = MenuUtils.resetComponentConfig(item, appType)
     }
 
     return item
@@ -56,16 +54,16 @@
 
   pasteSubmit = () => {
     let appType = sessionStorage.getItem('appType')
-    let options = ['tabs', 'timeline', 'datacard', 'propcard', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'iframe', 'sandbox']
+    let options = ['tabs', 'timeline', 'datacard', 'propcard', 'simpleform', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'editor', 'pie', 'scatter', 'iframe', 'sandbox']
 
     if (appType === 'mob') {
       if (sessionStorage.getItem('editMenuType') !== 'popview') {
-        options.push('menubar', 'topbar')
+        options.push('menubar', 'topbar', 'singleSearch')
       } else {
-        options.push('menubar')
+        options.push('menubar', 'singleSearch')
       }
     } else {
-      options.push('editable', 'antvG6', 'tree', 'dashboard', 'chart')
+      options.push('editable', 'mainsearch', 'antvG6', 'tree', 'dashboard', 'chart')
     }
 
     this.pasteFormRef.handleConfirm().then(res => {
@@ -78,7 +76,7 @@
         return
       }
 
-      res = this.resetconfig(res)
+      res = this.resetconfig(res, appType)
 
       // delete res.copyType
       

--
Gitblit v1.8.0