From f393af9623c26ae177a3f69b8676afc4e23bff8d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 08 二月 2022 14:48:51 +0800
Subject: [PATCH] 2022-02-08

---
 src/mob/components/tabs/tabcomponents/index.jsx |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/src/mob/components/tabs/tabcomponents/index.jsx b/src/mob/components/tabs/tabcomponents/index.jsx
index 3ed31ed..84ee423 100644
--- a/src/mob/components/tabs/tabcomponents/index.jsx
+++ b/src/mob/components/tabs/tabcomponents/index.jsx
@@ -75,22 +75,27 @@
       
       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 = ''
@@ -134,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