| | |
| | | config: null, |
| | | popBtn: null, // 弹窗标签页 |
| | | visible: false, |
| | | customComponents: [] |
| | | customComponents: [], |
| | | comloading: false |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | }) |
| | | |
| | | this.setState({ |
| | | config: {...config, components: []} |
| | | config: {...config, components}, |
| | | comloading: true |
| | | }, () => { |
| | | this.setState({ |
| | | config: {...config, components: components} |
| | | comloading: false |
| | | }) |
| | | }) |
| | | } |
| | |
| | | if (res.status) { |
| | | config.open_edition = res.open_edition || '' |
| | | this.setState({ |
| | | oriConfig: fromJS(config).toJS() |
| | | config, |
| | | oriConfig: fromJS(config).toJS(), |
| | | }) |
| | | |
| | | if (btnParam.LText) { |
| | |
| | | copyButtons: [], |
| | | thawButtons: [], |
| | | menuloading: false, |
| | | config: {...config, components: []} |
| | | comloading: true |
| | | }, () => { |
| | | this.setState({ |
| | | config: {...this.state.config, components: this.state.oriConfig.components} |
| | | comloading: false |
| | | }) |
| | | }) |
| | | notification.success({ |
| | |
| | | |
| | | resetConfig = (config) => { |
| | | this.setState({ |
| | | config: {...config, components: []} |
| | | config, |
| | | comloading: true |
| | | }, () => { |
| | | this.setState({ |
| | | config: config |
| | | comloading: false |
| | | }) |
| | | }) |
| | | window.GLOB.customMenu = config |
| | |
| | | } |
| | | |
| | | 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}> |
| | |
| | | <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> |