From 5891206952e2ff63e87aed2f47df5324b019d32e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 25 十月 2022 00:39:38 +0800 Subject: [PATCH] 2022-10-25 --- src/templates/comtableconfig/index.jsx | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index 6717638..74e2368 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -61,7 +61,6 @@ activeKey: '0', // 榛樿灞曞紑鍩烘湰淇℃伅 chartview: null, // 褰撳墠瑙嗗浘 openEdition: '', // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣� - modalStatus: false // 寮圭獥鏄惁寮�鍚紝鍒ゆ柇ctrl+s鏄惁鍙敤 } /** @@ -163,10 +162,23 @@ let _shortcut = `${preKey}+${keyCode}` if (_shortcut === 'ctrl+83') { - if (this.state.modalStatus) { + let modals = document.querySelectorAll('.mk-pop-modal') + let msg = null + for (let i = 0; i < modals.length; i++) { + if (msg) { + break + } + + let node = modals[i].querySelector('.mk-com-name') + + if (node) { + msg = node.innerText + } + } + if (msg) { notification.warning({ top: 92, - message: '璇蜂繚瀛�' + this.state.modalStatus, + message: '璇蜂繚瀛�' + msg, duration: 5 }) return false @@ -179,8 +191,6 @@ return false } } - - MKEmitter.addListener('modalStatus', this.modalStatus) } /** @@ -191,11 +201,6 @@ return } document.onkeydown = () => {} - MKEmitter.removeListener('modalStatus', this.modalStatus) - } - - modalStatus = (val) => { - this.setState({modalStatus: val}) } /** -- Gitblit v1.8.0