From e543372cc70a19ff2630c79d8421c2c593e54e5f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 02 六月 2021 17:15:21 +0800
Subject: [PATCH] 2021-06-02

---
 src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
index 285aff8..056813e 100644
--- a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
+++ b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
@@ -8,10 +8,11 @@
 import Utils from '@/utils/utils.js'
 import SettingUtils from './utils.jsx'
 import DataSource from './datasource'
-import CustomScript from '@/templates/zshare/customscript'
+import asyncComponent from '@/utils/asyncComponent'
 import './index.scss'
 
 const { TabPane } = Tabs
+const CustomScript = asyncComponent(() => import('@/templates/zshare/customscript'))
 
 class SettingForm extends Component {
   static propTpyes = {
@@ -73,7 +74,7 @@
         let _loading = false
         if (this.scriptsForm && this.scriptsForm.state.editItem) {
           _loading = true
-        } else if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql')) {
+        } else if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) {
           _loading = true
         }
   
@@ -191,7 +192,7 @@
       let _loading = false
       if (this.scriptsForm && this.scriptsForm.state.editItem) {
         _loading = true
-      } else if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql')) {
+      } else if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) {
         _loading = true
       }
 

--
Gitblit v1.8.0