king
2023-07-03 3b1c5118e37500a26021adb8a6c1c11b741d7bbc
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)
          })}
        })
      }