From a9a5211f48607fa7ac5bae91233f3a5e6df43587 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 20 一月 2022 14:09:04 +0800 Subject: [PATCH] 2022-01-20 --- src/views/pcdesign/index.jsx | 26 ++++++++++++++++++++++---- 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 174afee..7f0144d 100644 --- a/src/views/pcdesign/index.jsx +++ b/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} /> -- Gitblit v1.8.0