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 |   30 +++++++++++++++++++-----------
 1 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/src/mob/components/tabs/tabcomponents/index.jsx b/src/mob/components/tabs/tabcomponents/index.jsx
index 7bac2ee..84ee423 100644
--- a/src/mob/components/tabs/tabcomponents/index.jsx
+++ b/src/mob/components/tabs/tabcomponents/index.jsx
@@ -69,25 +69,33 @@
     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 = ''
@@ -108,6 +116,7 @@
         navbar: '瀵艰埅鏍�',
         menubar: '鑿滃崟鏍�',
         balcony: '娴姩鍗�',
+        timeline: '鏃堕棿杞�',
         login: '鐧诲綍'
       }
       let i = 1
@@ -130,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