king
2021-07-22 cc23ebd63e2aec82db0a43965f4731789316fb78
src/views/menudesign/index.jsx
@@ -68,7 +68,8 @@
    config: null,
    popBtn: null,             // 弹窗标签页
    visible: false,
    customComponents: []
    customComponents: [],
    comloading: false
  }
  UNSAFE_componentWillMount() {
@@ -203,10 +204,11 @@
    })
    this.setState({
      config: {...config, components: []}
      config: {...config, components},
      comloading: true
    }, () => {
      this.setState({
        config: {...config, components: components}
        comloading: false
      })
    })
  }
@@ -656,7 +658,8 @@
        if (res.status) {
          config.open_edition = res.open_edition || ''
          this.setState({
            oriConfig: fromJS(config).toJS()
            config,
            oriConfig: fromJS(config).toJS(),
          })
          if (btnParam.LText) {
@@ -774,10 +777,10 @@
            copyButtons: [],
            thawButtons: [],
            menuloading: false,
            config: {...config, components: []}
            comloading: true
          }, () => {
            this.setState({
              config: {...this.state.config, components: this.state.oriConfig.components}
              comloading: false
            })
          })
          notification.success({
@@ -902,10 +905,11 @@
  resetConfig = (config) => {
    this.setState({
      config: {...config, components: []}
      config,
      comloading: true
    }, () => {
      this.setState({
        config: config
        comloading: false
      })
    })
    window.GLOB.customMenu = config
@@ -921,7 +925,7 @@
  }
  render () {
    const { activeKey, MenuType, popBtn, visible, dict, MenuId, config, ParentId, MenuName, MenuNo, menuloading, customComponents } = this.state
    const { activeKey, comloading, MenuType, popBtn, visible, dict, MenuId, config, ParentId, MenuName, MenuNo, menuloading, customComponents } = this.state
    return (
      <ConfigProvider locale={_locale}>
@@ -990,7 +994,7 @@
                    <Button type="default" onClick={this.closeView}>关闭</Button>
                  </div>
                } style={{ width: '100%' }}>
                  {config && config.components ? <MenuShell menu={config} handleList={this.updateConfig} /> : null}
                  {config && !comloading ? <MenuShell menu={config} handleList={this.updateConfig} /> : null}
                </Card>
              </div>
            </div>