king
2020-12-31 b22d87d94675b560b4054b7fe0d0f7c4159ac2ce
2020-12-31
1个文件已修改
19 ■■■■ 已修改文件
src/tabviews/verupmanage/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/verupmanage/index.jsx
@@ -421,6 +421,14 @@
    })
  }
  reloadMenuView = (menuId) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.reloadview()
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
@@ -430,6 +438,10 @@
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  componentDidMount () {
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
  }
  /**
   * @description 组件销毁,清除state更新
   */
@@ -437,6 +449,7 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
  }
  render() {
@@ -483,8 +496,8 @@
            chgSelectData={this.changeSelectedData}
          />
        </div>
        <Tabs defaultActiveKey="0">
          {config.tabs && config.tabs.map((_tab, index) => {
        {config.tabs ? <Tabs defaultActiveKey="0">
          {config.tabs.map((_tab, index) => {
            return (
              <TabPane tab={
                <span>
@@ -506,7 +519,7 @@
              </TabPane>
            )
          })}
        </Tabs>
        </Tabs> : null}
      </div>
    )
  }