From 15acad2194d616b37d85dd6192bc5656403f1a83 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 19 五月 2022 17:19:40 +0800 Subject: [PATCH] 2022-05-19 --- src/templates/comtableconfig/index.jsx | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index f36afd9..07773f6 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -64,7 +64,8 @@ thawButtons: [], // 宸查�夋嫨瑕佽В鍐荤殑鎸夐挳 activeKey: '0', // 榛樿灞曞紑鍩烘湰淇℃伅 chartview: null, // 褰撳墠瑙嗗浘 - openEdition: '' // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣� + openEdition: '', // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣� + modalStatus: false // 寮圭獥鏄惁寮�鍚紝鍒ゆ柇ctrl+s鏄惁鍙敤 } /** @@ -169,6 +170,15 @@ let _shortcut = `${preKey}+${keyCode}` if (_shortcut === 'ctrl+83') { + if (this.state.modalStatus) { + notification.warning({ + top: 92, + message: '璇蜂繚瀛�' + this.state.modalStatus, + duration: 5 + }) + return false + } + let node = document.getElementById('save-config') if (node && node.click) { node.click() @@ -176,6 +186,8 @@ return false } } + + MKEmitter.addListener('modalStatus', this.modalStatus) } /** @@ -186,6 +198,11 @@ return } document.onkeydown = () => {} + MKEmitter.removeListener('modalStatus', this.modalStatus) + } + + modalStatus = (val) => { + this.setState({modalStatus: val}) } /** -- Gitblit v1.8.0