From 5046d0d13dc6a8563b8e54e31913bc44cfa1072f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 26 四月 2022 19:23:18 +0800
Subject: [PATCH] 2022-04-26

---
 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