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

diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx
index 78e573a..09744d9 100644
--- a/src/templates/subtableconfig/index.jsx
+++ b/src/templates/subtableconfig/index.jsx
@@ -66,7 +66,8 @@
     thawButtons: [],         // 宸查�夋嫨瑕佽В鍐荤殑鎸夐挳
     activeKey: '0',          // 榛樿灞曞紑鍩烘湰淇℃伅
     chartview: null,         // 褰撳墠瑙嗗浘
-    openEdition: ''          // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣�
+    openEdition: '',         // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣�
+    modalStatus: false       // 寮圭獥鏄惁寮�鍚紝鍒ゆ柇ctrl+s鏄惁鍙敤
   }
 
   /**
@@ -152,6 +153,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()
@@ -159,6 +169,7 @@
         return false
       }
     }
+    MKEmitter.addListener('modalStatus', this.modalStatus)
   }
 
   /**
@@ -219,6 +230,11 @@
       return
     }
     document.onkeydown = () => {}
+    MKEmitter.removeListener('modalStatus', this.modalStatus)
+  }
+
+  modalStatus = (val) => {
+    this.setState({modalStatus: val})
   }
 
   // 椤甸潰杩斿洖

--
Gitblit v1.8.0