From 2b0818d407be09db0717a1922139707793c86026 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 06 七月 2024 14:33:02 +0800
Subject: [PATCH] 2024-07-06

---
 src/utils/utils-custom.js          |   27 ++++++++++++++++-----------
 src/menu/pastecontroller/index.jsx |    7 +------
 src/menu/transfer/index.jsx        |    9 ++-------
 3 files changed, 19 insertions(+), 24 deletions(-)

diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx
index fda2eb1..b9b8937 100644
--- a/src/menu/pastecontroller/index.jsx
+++ b/src/menu/pastecontroller/index.jsx
@@ -23,12 +23,7 @@
   }
 
   resetconfig = (item, appType, commonId) => {
-    if (item.type === 'navbar') {
-      item.uuid = MenuUtils.getuuid()
-      item.menus.forEach(menu => {
-        menu.MenuID = MenuUtils.getuuid()
-      })
-    } else if (item.type === 'tabs') {
+    if (item.type === 'tabs') {
       item.uuid = md5(commonId + item.uuid)
       item.setting.name = (item.setting.name || '') + MenuUtils.getSignName()
       item.name = item.setting.name
diff --git a/src/menu/transfer/index.jsx b/src/menu/transfer/index.jsx
index f4fa0e0..5e9c7d8 100644
--- a/src/menu/transfer/index.jsx
+++ b/src/menu/transfer/index.jsx
@@ -74,8 +74,6 @@
 
     delete _config.autoMatic
 
-    let useMSearch = false
-
     if (clear) {
       _config.components = []
     } else {
@@ -91,9 +89,6 @@
             tab.components[0].width = 24
             tab.components[0].wrap.width = 24
             tab.components[0].wrap.name = tab.components[0].name
-            if (tab.components[0].setting.useMSearch === 'true') {
-              useMSearch = true
-            }
   
             tab.components[0].action.forEach(btn => {
               if (btn.OpenType === 'popview' && btn.config) {
@@ -145,14 +140,14 @@
       })
     }
 
-    if (useMSearch) {
+    if (_config.components[0].search && _config.components[0].search.length > 0) {
       let cell = {
         uuid: Utils.getuuid(),
         type: 'search',
         width: 24,
         subtype: 'mainsearch',
         name: '鎼滅储',
-        search: _config.components[0].search || [],
+        search: _config.components[0].search,
         style: {borderBottomColor: '#f0f0f0', borderBottomWidth: '1px'},
         wrap: {float: 'left', blacklist: [], name: '鎼滅储', width: 24}
       }
diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 6823cc6..c64fdea 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -703,10 +703,6 @@
   * @return {String}  item 缁勪欢淇℃伅
   */
   static resetComponentConfig = (item, appType, commonId) => {
-    if (item.type === 'navbar') {
-      return item
-    }
-
     if (item.subtype === 'tablecard') { // 鍏煎
       item.type = 'card'
     }
@@ -724,7 +720,22 @@
       item.name = item.setting.name
     }
 
-    if (item.type === 'menubar') {
+    if (item.columns) {
+      item.columns = item.columns.map(cell => {
+        cell.uuid = this.getuuid()
+        return cell
+      })
+    }
+
+    if (item.type === 'navbar') {
+      if (appType === 'mob') {
+        item.menus.forEach(menu => {
+          menu.MenuID = this.getuuid()
+        })
+        item.wrap.MenuNo = item.wrap.MenuNo + sign
+      }
+      return item
+    } else if (item.type === 'menubar') {
       item.subMenus = item.subMenus.map(cell => {
         cell.uuid = this.getuuid()
         return cell
@@ -923,12 +934,6 @@
       }
     } else if (item.search) {
       item.search = item.search.map(cell => {
-        cell.uuid = this.getuuid()
-        return cell
-      })
-    }
-    if (item.columns) {
-      item.columns = item.columns.map(cell => {
         cell.uuid = this.getuuid()
         return cell
       })

--
Gitblit v1.8.0