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

diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx
index c574d3e..e935c98 100644
--- a/src/views/pcdesign/index.jsx
+++ b/src/views/pcdesign/index.jsx
@@ -77,7 +77,8 @@
     settingshow: sessionStorage.getItem('settingshow') !== 'false',
     controlshow: sessionStorage.getItem('controlshow') !== 'false',
     comloading: false,
-    eyeopen: false
+    eyeopen: false,
+    modalStatus: false       // 寮圭獥鏄惁寮�鍚紝鍒ゆ柇ctrl+s鏄惁鍙敤
   }
 
   UNSAFE_componentWillMount() {
@@ -130,6 +131,7 @@
       return
     }
     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)
@@ -163,6 +165,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')
@@ -187,6 +198,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)
@@ -196,6 +208,10 @@
     MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent)
   }
 
+  modalStatus = (val) => {
+    this.setState({modalStatus: val})
+  }
+
   triggerMenuSave = () => {
     if (this.state.visible) return
 

--
Gitblit v1.8.0