From f267d04e0561a0a20d1f2a9f558a273558ece90d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 24 五月 2021 17:50:19 +0800
Subject: [PATCH] 2021-05-24

---
 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