From 1febb373dcca833cba418e7c74b3d60720b953e9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 14 四月 2022 10:10:56 +0800 Subject: [PATCH] 2022-04-14 --- src/menu/popview/index.jsx | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/menu/popview/index.jsx b/src/menu/popview/index.jsx index 7e90b9a..e820385 100644 --- a/src/menu/popview/index.jsx +++ b/src/menu/popview/index.jsx @@ -46,7 +46,8 @@ menuloading: false, oriConfig: null, config: null, - customComponents: [] + customComponents: [], + comloading: false } UNSAFE_componentWillMount() { @@ -133,10 +134,11 @@ }) this.setState({ - config: {...config, components: []} + config: {...config, components}, + comloading: true }, () => { this.setState({ - config: {...config, components: components} + comloading: false }) }) } @@ -577,10 +579,11 @@ resetConfig = (config) => { this.setState({ - config: {...config, components: []}, + config, + comloading: true }, () => { this.setState({ - config: config + comloading: false }) }) @@ -625,7 +628,7 @@ 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"> @@ -670,7 +673,7 @@ <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> -- Gitblit v1.8.0