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/views/menudesign/index.jsx |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx
index 05c041b..ec5be4e 100644
--- a/src/views/menudesign/index.jsx
+++ b/src/views/menudesign/index.jsx
@@ -75,7 +75,8 @@
     customComponents: [],
     comloading: false,
     settingshow: true,
-    eyeopen: false
+    eyeopen: false,
+    modalStatus: false       // 寮圭獥鏄惁寮�鍚紝鍒ゆ柇ctrl+s鏄惁鍙敤
   }
 
   UNSAFE_componentWillMount() {
@@ -106,6 +107,7 @@
 
   componentDidMount () {
     MKEmitter.addListener('delButtons', this.delButtons)
+    MKEmitter.addListener('modalStatus', this.modalStatus)
     MKEmitter.addListener('thawButtons', this.thawButtons)
     MKEmitter.addListener('copyButtons', this.copyButtons)
     MKEmitter.addListener('changePopview', this.initPopview)
@@ -138,6 +140,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-modal-config')
         if (!node) {
           node = document.getElementById('save-pop-config')
@@ -162,6 +173,7 @@
       return
     }
     MKEmitter.removeListener('delButtons', this.delButtons)
+    MKEmitter.removeListener('modalStatus', this.modalStatus)
     MKEmitter.removeListener('thawButtons', this.thawButtons)
     MKEmitter.removeListener('copyButtons', this.copyButtons)
     MKEmitter.removeListener('changePopview', this.initPopview)
@@ -170,6 +182,10 @@
     MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent)
   }
 
+  modalStatus = (val) => {
+    this.setState({modalStatus: val})
+  }
+
   triggerMenuSave = () => {
     if (this.state.visible) return
 

--
Gitblit v1.8.0