| | |
| | | menuloading: false, |
| | | oriConfig: null, |
| | | config: null, |
| | | customComponents: [] |
| | | customComponents: [], |
| | | comloading: false |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | }) |
| | | |
| | | this.setState({ |
| | | config: {...config, components: []} |
| | | config: {...config, components}, |
| | | comloading: true |
| | | }, () => { |
| | | this.setState({ |
| | | config: {...config, components: components} |
| | | comloading: false |
| | | }) |
| | | }) |
| | | } |
| | |
| | | |
| | | resetConfig = (config) => { |
| | | this.setState({ |
| | | config: {...config, components: []}, |
| | | config, |
| | | comloading: true |
| | | }, () => { |
| | | this.setState({ |
| | | config: config |
| | | comloading: false |
| | | }) |
| | | }) |
| | | |
| | |
| | | |
| | | render () { |
| | | const { btn } = this.props |
| | | const { activeKey, dict, config, menuloading, customComponents, MenuId } = this.state |
| | | const { activeKey, comloading, dict, config, menuloading, customComponents, MenuId } = this.state |
| | | |
| | | return ( |
| | | <div className="pc-poper-view"> |
| | |
| | | <Button type="default" onClick={this.closeView}>{dict['mob.return']}</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> |