From c4143d291e70b3ccff023a5a3e09f49889f5daa0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 03 十一月 2023 21:48:34 +0800 Subject: [PATCH] 2023-11-03 --- src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index efd4a13..5dbb18b 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -6,6 +6,7 @@ import { dateOptions, matchReg, formRule } from '@/utils/option.js' import Utils from '@/utils/utils.js' +import { checkSQL } from '@/utils/utils-custom.js' import CodeMirror from '@/templates/zshare/codemirror' import asyncComponent from '@/utils/asyncComponent' import './index.scss' @@ -828,16 +829,9 @@ } }) - let error = Utils.verifySql(values.dataSource) + let pass = checkSQL(values.dataSource) - if (error) { - notification.warning({ - top: 92, - message: '鏁版嵁婧愪腑涓嶅彲浣跨敤' + error, - duration: 5 - }) - return - } + if (!pass) return resolve(values) } else { -- Gitblit v1.8.0