king
2022-01-20 a9a5211f48607fa7ac5bae91233f3a5e6df43587
src/views/pcdesign/index.jsx
@@ -17,6 +17,7 @@
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'
@@ -546,10 +547,7 @@
    if (!config) {
      window.close()
      return
    }
    if (!oriConfig || !is(fromJS(oriConfig), fromJS(config))) {
    } else if (!oriConfig || !is(fromJS(oriConfig), fromJS(config))) {
      confirm({
        title: '配置信息未保存,确定关闭吗?',
        content: '',
@@ -560,6 +558,25 @@
      })
    } 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()
    }
  }
@@ -1761,6 +1778,7 @@
              <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} />