From 3b1c5118e37500a26021adb8a6c1c11b741d7bbc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 03 七月 2023 17:37:52 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/tabviews/custom/components/tabs/antv-tabs/index.jsx |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx b/src/tabviews/custom/components/tabs/antv-tabs/index.jsx
index 6d8b799..63eb3e2 100644
--- a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx
+++ b/src/tabviews/custom/components/tabs/antv-tabs/index.jsx
@@ -40,12 +40,15 @@
           }
         })
         _tabs.subtabs = config.subtabs.filter(tab => {
-          if (tab.controlVal === val) {
-            return false
-          } else if (/,/ig.test(tab.controlVal)) {
-            return !tab.controlVal.split(',').includes(val)
-          }
-          return true
+          if (tab.$pass) return true
+    
+          return !tab.controlVals.includes(val)
+        })
+      } else {
+        _tabs.subtabs = config.subtabs.filter(tab => {
+          if (tab.$pass) return true
+    
+          return tab.controlVals.includes('@pass_empty@')
         })
       }
     }
@@ -90,7 +93,11 @@
     if (tabs.setting.supModule === MenuID) {
       if (!data) {
         this.setState({
-          tabs: {...tabs, subtabs: []}
+          tabs: {...tabs, subtabs: this.props.config.subtabs.filter(tab => {
+            if (tab.$pass) return true
+    
+            return tab.controlVals.includes('@pass_empty@')
+          })}
         })
       } else {
         let val = ''
@@ -101,12 +108,9 @@
         })
         this.setState({
           tabs: {...tabs, subtabs: this.props.config.subtabs.filter(tab => {
-            if (tab.controlVal === val) {
-              return false
-            } else if (/,/ig.test(tab.controlVal)) {
-              return !tab.controlVal.split(',').includes(val)
-            }
-            return true
+            if (tab.$pass) return true
+    
+            return !tab.controlVals.includes(val)
           })}
         })
       }

--
Gitblit v1.8.0