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/menudesign/index.jsx |   25 ++++++-------------------
 1 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx
index 9324a82..84cee4d 100644
--- a/src/views/menudesign/index.jsx
+++ b/src/views/menudesign/index.jsx
@@ -1,5 +1,4 @@
 import React, { Component } from 'react'
-import { connect } from 'react-redux'
 import { DndProvider } from 'react-dnd'
 import { is, fromJS } from 'immutable'
 import moment from 'moment'
@@ -17,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'
 
@@ -49,6 +47,7 @@
 document.body.className = ''
 window.GLOB.UserComponentMap = new Map() // 缂撳瓨鐢ㄦ埛鑷畾涔夌粍浠�
 window.GLOB.urlFields = []               // url鍙橀噺
+window.GLOB.customMenu = null            // 淇濆瓨鑿滃崟淇℃伅
 
 class MenuDesign extends Component {
   state = {
@@ -248,7 +247,7 @@
   handleBack = () => {
     this.setState({popBtn: null, delButtons: [], copyButtons: []}, () => {
       sessionStorage.setItem('editMenuType', 'menu')
-      this.props.modifyCustomMenu(this.state.config)
+      window.GLOB.customMenu = this.state.config
       this.setState({visible: false})
     })
   }
@@ -342,8 +341,7 @@
           oriConfig: config,
           config: fromJS(config).toJS()
         })
-
-        this.props.modifyCustomMenu(config)
+        window.GLOB.customMenu = config
       } else {
         notification.warning({
           top: 92,
@@ -868,8 +866,7 @@
     this.setState({
       config: config
     })
-
-    this.props.modifyCustomMenu(config)
+    window.GLOB.customMenu = config
   }
 
   insert = (item) => {
@@ -878,7 +875,7 @@
     config.components.push(item)
 
     this.setState({config})
-    this.props.modifyCustomMenu(config)
+    window.GLOB.customMenu = config
   }
 
   render () {
@@ -965,14 +962,4 @@
   }
 }
 
-const mapStateToProps = () => {
-  return {}
-}
-
-const mapDispatchToProps = (dispatch) => {
-  return {
-    modifyCustomMenu: (customMenu) => dispatch(modifyCustomMenu(customMenu))
-  }
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(MenuDesign)
\ No newline at end of file
+export default MenuDesign
\ No newline at end of file

--
Gitblit v1.8.0