From 151d3aee0218a3eb6b928b0b327be6cd9ac7652c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 01 七月 2021 16:02:07 +0800
Subject: [PATCH] 2021-07-01

---
 src/views/mobdesign/index.jsx |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx
index 8082c53..9a637c2 100644
--- a/src/views/mobdesign/index.jsx
+++ b/src/views/mobdesign/index.jsx
@@ -373,10 +373,11 @@
     })
 
     this.setState({
-      config: {...config, components: []}
+      config: {...config, components},
+      comloading: true
     }, () => {
       this.setState({
-        config: {...config, components: components}
+        comloading: false
       })
     })
   }
@@ -1102,8 +1103,9 @@
 
         if (res.status) {
           config.open_edition = res.open_edition || ''
-
+          
           this.setState({
+            config,
             oriConfig: fromJS(config).toJS(),
           })
 
@@ -1222,10 +1224,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({
@@ -1520,9 +1522,9 @@
               <Button type="default" onClick={this.closeView}>鍏抽棴</Button>
             </div>
             <div className={'menu-body ' + (menuloading ? 'saving' : '')}>
-              <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}>
-                {config && !comloading ? <MobShell menu={config} handleList={this.updateConfig} /> : null}
-              </div>
+              {config && !comloading ? <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}>
+                <MobShell menu={config} handleList={this.updateConfig} />
+              </div> : null}
             </div>
           </DndProvider>
           <StyleController />

--
Gitblit v1.8.0