| | |
| | | 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' |
| | | |
| | |
| | | window.GLOB.UserComponentMap = new Map() // 缓存用户自定义组件 |
| | | window.GLOB.CacheIndependent = new Map() |
| | | window.GLOB.urlFields = [] // url变量 |
| | | window.GLOB.customMenu = null // 保存菜单信息 |
| | | |
| | | class MobDesign extends Component { |
| | | state = { |
| | |
| | | config: fromJS(config).toJS(), |
| | | loading: false |
| | | }) |
| | | |
| | | this.props.modifyCustomMenu(config) |
| | | window.GLOB.customMenu = config |
| | | } else { |
| | | this.jointComponents(config, indeComs, isCreate) |
| | | } |
| | |
| | | loading: false |
| | | }) |
| | | |
| | | this.props.modifyCustomMenu(config) |
| | | window.GLOB.customMenu = config |
| | | } else { |
| | | this.jointComponents(config, indeComs, true) |
| | | } |
| | |
| | | config: config, |
| | | loading: false |
| | | }) |
| | | |
| | | this.props.modifyCustomMenu(config) |
| | | window.GLOB.customMenu = config |
| | | }) |
| | | } |
| | | |
| | |
| | | config: config |
| | | }) |
| | | |
| | | this.props.modifyCustomMenu(config) |
| | | window.GLOB.customMenu = config |
| | | } |
| | | |
| | | insert = (item) => { |
| | |
| | | config.components.push(item) |
| | | |
| | | this.setState({config}) |
| | | this.props.modifyCustomMenu(config) |
| | | window.GLOB.customMenu = config |
| | | } |
| | | |
| | | refreshView = () => { |
| | |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = (dispatch) => { |
| | | return { |
| | | modifyCustomMenu: (customMenu) => dispatch(modifyCustomMenu(customMenu)) |
| | | } |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MobDesign)) |