From f3167f8371d19d0ea8fe7d0e7af5517ff0b08cd2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 07 四月 2021 23:25:29 +0800 Subject: [PATCH] 2021-04-07 --- src/menu/sysinterface/settingform/index.jsx | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/menu/sysinterface/settingform/index.jsx b/src/menu/sysinterface/settingform/index.jsx index 94d9a80..2f6e4d0 100644 --- a/src/menu/sysinterface/settingform/index.jsx +++ b/src/menu/sysinterface/settingform/index.jsx @@ -18,7 +18,7 @@ } state = { - dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, + dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, formlist: [], btnloading: false, activeKey: 'setting', @@ -47,9 +47,9 @@ const { activeKey, setting, preScripts, cbScripts } = this.state let _loading = false - if (this.preScriptsForm && this.preScriptsForm.props.form.getFieldValue('sql')) { + if (this.preScriptsForm && this.preScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.preScriptsForm.props.form.getFieldValue('sql'))) { _loading = true - } else if (this.cbScriptsForm && this.cbScriptsForm.props.form.getFieldValue('sql')) { + } else if (this.cbScriptsForm && this.cbScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.cbScriptsForm.props.form.getFieldValue('sql'))) { _loading = true } @@ -83,9 +83,9 @@ const { activeKey } = this.state let _loading = false - if (this.preScriptsForm && this.preScriptsForm.props.form.getFieldValue('sql')) { + if (this.preScriptsForm && this.preScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.preScriptsForm.props.form.getFieldValue('sql'))) { _loading = true - } else if (this.cbScriptsForm && this.cbScriptsForm.props.form.getFieldValue('sql')) { + } else if (this.cbScriptsForm && this.cbScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.cbScriptsForm.props.form.getFieldValue('sql'))) { _loading = true } -- Gitblit v1.8.0