From 5ff23c882da8bd2dca0848ae1a97d23f6bfecd9d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 27 六月 2021 23:10:07 +0800 Subject: [PATCH] 2021-06-27 --- src/tabviews/custom/components/form/normal-form/index.jsx | 18 +++--------------- 1 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/tabviews/custom/components/form/normal-form/index.jsx b/src/tabviews/custom/components/form/normal-form/index.jsx index 59b40f1..b0e13a5 100644 --- a/src/tabviews/custom/components/form/normal-form/index.jsx +++ b/src/tabviews/custom/components/form/normal-form/index.jsx @@ -259,28 +259,16 @@ if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { this.setState({ - data: {}, - loading: false + data: {} }) btn && this.execSuccess(btn) return } - let searches = [] - if (config.setting.useMSearch && mainSearch && mainSearch.length > 0) { // 涓昏〃鎼滅储鏉′欢 - let keys = searches.map(item => item.key) - mainSearch.forEach(item => { - if (!keys.includes(item.key)) { - searches.push(item) - } - }) - } + let searches = config.setting.useMSearch && mainSearch ? mainSearch : [] - let requireFields = searches.filter(item => item.required && (!item.value || item.value.length === 0)) + let requireFields = searches.filter(item => item.required && item.value === '') if (requireFields.length > 0) { - this.setState({ - loading: false - }) btn && this.execSuccess(btn) return } -- Gitblit v1.8.0