king
2023-03-14 da34633b25d16359cd91a656acad5e811f9972b7
src/components/tabview/index.jsx
@@ -108,7 +108,7 @@
  
      // 获取主菜单参数
      let menudefer = new Promise(resolve => {
        Api.getAppVersion().then(() => {
        Api.getAppVersion(menu.MenuID).then(() => {
          resolve()
        }, () => {
          resolve()
@@ -123,10 +123,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)
@@ -143,7 +143,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({
@@ -160,11 +160,6 @@
          activeId: tab.MenuID
        })
      }
    } else if (type === 'replace') {
      this.setState({
        tabviews: tab ? [tab] : [],
        activeId: tab ? tab.MenuID : ''
      })
    }
    let node = document.getElementById('root').parentNode.parentNode
@@ -266,11 +261,11 @@
    const { tabviews, activeId } = this.state
    return (
      <section id="mk-tabview-wrap" className={'mk-tabview-wrap' + (this.props.collapse ? ' collapsed' : '') + (tabviews && tabviews.length > 0 ? ' hastab' : '')}>
      <section className={'mk-tabview-wrap' + (this.props.collapse ? ' collapsed' : '')}>
        <div className="content-header">
          {tabviews && tabviews.length > 0 &&
            <Tabs activeKey={activeId}>
              {tabviews.map((view, index) => {
              {tabviews.map(view => {
                return (
                  <Tabs.TabPane
                    tab={
@@ -294,7 +289,6 @@
                        </div>
                      </div>
                    </BackTop>
                    {/* {options.sysType === 'local' && window.GLOB.systemType !== 'production' ? <div className="mk-water-mark">测试系统</div> : null} */}
                  </Tabs.TabPane>
                )
              })}