king
2021-04-07 9e100b8804d43d9f7559cdf41b67ed7475a809b8
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))