king
2022-11-23 891e8aaad3b2ce6980fd44d1cf49192dca1c3c66
src/components/tabview/index.jsx
@@ -124,10 +124,10 @@
    }
  }
  modifyTabs = (tab, type, fixed) => {
  modifyTabs = (tab, fixed) => {
    const { tabviews, activeId } = this.state
    if (type === 'plus' && fixed) {
    if (fixed) {
      let _tabs = tabviews.filter(item => item.MenuID !== tab.MenuID)
      let index = _tabs.findIndex(item => item.MenuID === activeId)
@@ -144,7 +144,7 @@
          activeId: tab.MenuID
        })
      })
    } else if (type === 'plus') {
    } else {
      if (tabviews.findIndex(item => item.MenuID === tab.MenuID) > -1) {
        let _tabs = tabviews.filter(item => item.MenuID !== tab.MenuID)
        this.setState({
@@ -161,11 +161,6 @@
          activeId: tab.MenuID
        })
      }
    } else if (type === 'replace') {
      this.setState({
        tabviews: tab ? [tab] : [],
        activeId: tab ? tab.MenuID : ''
      })
    }
    let node = document.getElementById('root').parentNode.parentNode