From b6cbfb08b51e87e6eac995be8e7751815715e6a1 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 29 三月 2022 15:36:21 +0800
Subject: [PATCH] 2022-03-29

---
 src/tabviews/custom/components/form/tab-form/index.jsx |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx
index 00dd179..6832965 100644
--- a/src/tabviews/custom/components/form/tab-form/index.jsx
+++ b/src/tabviews/custom/components/form/tab-form/index.jsx
@@ -111,7 +111,9 @@
       arr_field: config.columns.map(col => col.field).join(','),
     }, () => {
       if (config.wrap.datatype !== 'static' && config.setting && config.setting.sync !== 'true' && config.setting.onload === 'true') {
-        this.loadData()
+        setTimeout(() => {
+          this.loadData()
+        }, config.setting.delay || 0)
       }
     })
   }
@@ -182,16 +184,16 @@
 
     if (group.uuid !== menuId) return
 
-    if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) {
-      MKEmitter.emit('reloadData', btn.syncComponentId)                        // 鍚岀骇鏍囩鍒锋柊
+    btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId)
+
+    if (!btn.syncComponentId || btn.syncComponentId !== config.setting.supModule) {
+      if (config.wrap.datatype !== 'static' && config.setting) {
+        this.loadData()
+      }
     }
 
     if (id) {
       MKEmitter.emit('resetSelectLine', config.uuid, id, '')
-    }
-
-    if (config.wrap.datatype !== 'static' && config.setting) {
-      this.loadData()
     }
 
     this.execSuccess(btn, id)

--
Gitblit v1.8.0