From d59f518f466274b2caeb2e01c10c92deafe7c93b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 09 二月 2022 11:48:29 +0800
Subject: [PATCH] 2022-02-09

---
 src/mob/components/tabs/tabcomponents/index.jsx |   41 +++++++++++++++++++++++++----------------
 1 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/src/mob/components/tabs/tabcomponents/index.jsx b/src/mob/components/tabs/tabcomponents/index.jsx
index 2259bf2..84ee423 100644
--- a/src/mob/components/tabs/tabcomponents/index.jsx
+++ b/src/mob/components/tabs/tabcomponents/index.jsx
@@ -69,30 +69,38 @@
     drop(item) {
       if (item.hasOwnProperty('originalIndex') || item.added) {
         return
+      } else if (['login', 'navbar', 'topbar'].includes(item.component)) {
+        return
       }
+      
       item.added = true
 
-      if (item.component === 'search') { // 鎼滅储缁勪欢涓嶅彲閲嶅娣诲姞
-        if (cards.filter(card => card.type === 'search').length > 0) {
+      if (item.component === 'search') { // 绉诲姩绔爣绛鹃〉涓笉鍙坊鍔犳悳绱�
+        // if (cards.filter(card => card.type === 'search').length > 0) {
+        //   notification.warning({
+        //     top: 92,
+        //     message: '鎼滅储鏉′欢涓嶅彲閲嶅娣诲姞锛�',
+        //     duration: 5
+        //   })
+        //   return
+        // }
+        item.added = false
+        return
+      } else if (item.component === 'tabs') {
+        let floor = MenuUtils.getFloor(config.parentId)
+        if (floor >= 3 ) {
           notification.warning({
             top: 92,
-            message: '鎼滅储鏉′欢涓嶅彲閲嶅娣诲姞锛�',
+            message: '鏍囩椤垫渶澶氫负涓夐噸缁撴瀯锛�',
             duration: 5
           })
           return
         }
-      } else if (item.component === 'tabs' && config.floor === 3) {
-        notification.warning({
-          top: 92,
-          message: '鏍囩椤垫渶澶氫负涓夐噸缁撴瀯锛�',
-          duration: 5
-        })
-        return
       }
 
       let name = ''
       let names = {
-        bbar: '鏌辩姸鍥�',
+        bar: '鏌辩姸鍥�',
         line: '鎶樼嚎鍥�',
         tabs: '鏍囩缁�',
         pie: '楗煎浘',
@@ -102,12 +110,14 @@
         editor: '瀵屾枃鏈�',
         code: '鑷畾涔�',
         carousel: '杞挱',
-        form: '琛ㄥ崟',
         dashboard: '浠〃鐩�',
-        scatter: '鏁g偣鍥�',
+        form: '琛ㄥ崟',
+        card: '鍗$墖',
+        navbar: '瀵艰埅鏍�',
         menubar: '鑿滃崟鏍�',
-        tree: '鏍戝舰鍒楄〃',
-        card: '鍗$墖'
+        balcony: '娴姩鍗�',
+        timeline: '鏃堕棿杞�',
+        login: '鐧诲綍'
       }
       let i = 1
       
@@ -129,7 +139,6 @@
         width: item.width || 24,
         dataName: Utils.getdataName(),
         name: name,
-        floor: config.floor ? (config.floor + 1) : 2, // 缁勪欢鐨勫眰绾�
         isNew: true                                   // 鏂版坊鍔犳爣蹇楋紝鐢ㄤ簬鍒濆鍖�
       }
       

--
Gitblit v1.8.0