From 9e100b8804d43d9f7559cdf41b67ed7475a809b8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 07 四月 2021 18:30:58 +0800
Subject: [PATCH] 2021-04-07

---
 src/views/pcdesign/index.jsx |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx
index c814a3f..29818ec 100644
--- a/src/views/pcdesign/index.jsx
+++ b/src/views/pcdesign/index.jsx
@@ -16,7 +16,6 @@
 import MKEmitter from '@/utils/events.js'
 import MenuUtils from '@/utils/utils-custom.js'
 import asyncComponent from '@/utils/asyncComponent'
-import { modifyCustomMenu } from '@/store/action'
 
 import './index.scss'
 
@@ -45,6 +44,7 @@
 window.GLOB.UserComponentMap = new Map() // 缂撳瓨鐢ㄦ埛鑷畾涔夌粍浠�
 window.GLOB.CacheIndependent = new Map()
 window.GLOB.urlFields = []               // url鍙橀噺
+window.GLOB.customMenu = null            // 淇濆瓨鑿滃崟淇℃伅
 
 class MenuDesign extends Component {
   state = {
@@ -469,8 +469,8 @@
             config: fromJS(config).toJS(),
             loading: false
           })
-  
-          this.props.modifyCustomMenu(config)
+
+          window.GLOB.customMenu = config
         } else {
           this.jointComponents(config, indeComs, isCreate)
         }
@@ -584,8 +584,7 @@
           config: fromJS(config).toJS(),
           loading: false
         })
-
-        this.props.modifyCustomMenu(config)
+        window.GLOB.customMenu = config
       } else {
         this.jointComponents(config, indeComs, true)
       }
@@ -661,7 +660,7 @@
         loading: false
       })
 
-      this.props.modifyCustomMenu(config)
+      window.GLOB.customMenu = config
     })
   }
 
@@ -1306,7 +1305,7 @@
       config: config
     })
 
-    this.props.modifyCustomMenu(config)
+    window.GLOB.customMenu = config
   }
 
   insert = (item) => {
@@ -1315,7 +1314,7 @@
     config.components.push(item)
 
     this.setState({config})
-    this.props.modifyCustomMenu(config)
+    window.GLOB.customMenu = config
   }
 
   refreshView = () => {
@@ -1479,10 +1478,8 @@
   }
 }
 
-const mapDispatchToProps = (dispatch) => {
-  return {
-    modifyCustomMenu: (customMenu) => dispatch(modifyCustomMenu(customMenu))
-  }
+const mapDispatchToProps = () => {
+  return {}
 }
 
 export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MenuDesign))
\ No newline at end of file

--
Gitblit v1.8.0