From 9cfccf5bd28a860fad48fe74ad7ea49d8af40dec Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 03 十一月 2022 12:52:27 +0800
Subject: [PATCH] 2022-11-03

---
 src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
index 0d6e3ec..26a4e4b 100644
--- a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
+++ b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
@@ -11,7 +11,6 @@
 
 class CustomForm extends Component {
   static propTpyes = {
-    dict: PropTypes.object,         // 瀛楀吀椤�
     btn: PropTypes.object,          // 鎸夐挳淇℃伅
     scripts: PropTypes.array,       // 鑷畾涔夎剼鏈垪琛�
     usefulfields: PropTypes.any,    // 鍙敤瀛楁
@@ -62,6 +61,15 @@
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     this.props.form.validateFieldsAndScroll((err, values) => {
       if (!err) {
+        if (/^[\s\n]+$/.test(values.sql)) {
+          notification.warning({
+            top: 92,
+            message: '璇疯緭鍏ql!',
+            duration: 5
+          })
+          return
+        }
+        
         values.uuid = this.state.editItem ? this.state.editItem.uuid : ''
 
         let _quot = values.sql.match(/'{1}/g)
@@ -334,7 +342,7 @@
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.input'] + 'sql!'
+                    message: '璇疯緭鍏ql!'
                   }
                 ]
               })(<CodeMirror />)}

--
Gitblit v1.8.0