| | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import backurl from '@/assets/img/back.jpg' |
| | | |
| | | import './index.scss' |
| | | |
| | |
| | | |
| | | if (!config) { |
| | | window.close() |
| | | return |
| | | } |
| | | |
| | | if (!oriConfig || !is(fromJS(oriConfig), fromJS(config))) { |
| | | } else if (!oriConfig || !is(fromJS(oriConfig), fromJS(config))) { |
| | | confirm({ |
| | | title: '配置信息未保存,确定关闭吗?', |
| | | content: '', |
| | |
| | | }) |
| | | } else { |
| | | window.close() |
| | | } |
| | | } |
| | | |
| | | backView = () => { |
| | | const { oriConfig, config } = this.state |
| | | |
| | | if (!config) { |
| | | window.history.back() |
| | | } else if (!oriConfig || !is(fromJS(oriConfig), fromJS(config))) { |
| | | confirm({ |
| | | title: '配置信息未保存,确定后退吗?', |
| | | content: '', |
| | | onOk() { |
| | | window.history.back() |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } else { |
| | | window.history.back() |
| | | } |
| | | } |
| | | |
| | |
| | | <div className="wrap"> |
| | | <Button type="primary" id="save-config" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button> |
| | | <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config && config.enabled} onChange={this.onEnabledChange} /> |
| | | <img title="后退" className="back-view" onClick={this.backView} src={backurl} alt=""/> |
| | | <CreateView resetmenu={this.getAppMenus} /> |
| | | <PasteController insert={this.insert} /> |
| | | <StyleCombControlButton menu={config} /> |