From 6ffa9ed530f4b04af6b8dfc58cd526d53e7c9c1a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 16 四月 2025 11:32:13 +0800
Subject: [PATCH] 2025-04-16

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   66 ++++++++++++++++++++++++---------
 1 files changed, 48 insertions(+), 18 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index fcd5a10..31fa58c 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -3041,15 +3041,30 @@
     
     if (btn.syncComponentId) {
       if (btn.syncComponentId === 'multiComponent') {
-        btn.syncComponentIds.forEach((id, i) => {
-          setTimeout(() => {
-            if (/\$focus/.test(id)) {
-              MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
-            } else {
-              MKEmitter.emit('reloadData', id)
-            }
-          }, 20 * i)
-        })
+        if (btn.syncDelay) {
+          this.delayTimer && clearTimeout(this.delayTimer)
+          this.delayTimer = setTimeout(() => {
+            btn.syncComponentIds.forEach((id, i) => {
+              setTimeout(() => {
+                if (/\$focus/.test(id)) {
+                  MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
+                } else {
+                  MKEmitter.emit('reloadData', id)
+                }
+              }, 20 * i)
+            })
+          }, btn.syncDelay)
+        } else {
+          btn.syncComponentIds.forEach((id, i) => {
+            setTimeout(() => {
+              if (/\$focus/.test(id)) {
+                MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
+              } else {
+                MKEmitter.emit('reloadData', id)
+              }
+            }, 20 * i)
+          })
+        }
       } else if (/\$focus/.test(btn.syncComponentId)) {
         MKEmitter.emit('reloadData', btn.syncComponentId.split('$')[0], btn.syncComponentId.split('$')[1])
       } else {
@@ -3812,15 +3827,30 @@
 
       if (btn.syncComponentId) {
         if (btn.syncComponentId === 'multiComponent') {
-          btn.syncComponentIds.forEach((id, i) => {
-            setTimeout(() => {
-              if (/\$focus/.test(id)) {
-                MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
-              } else {
-                MKEmitter.emit('reloadData', id)
-              }
-            }, 20 * i)
-          })
+          if (btn.syncDelay) {
+            this.delayTimer && clearTimeout(this.delayTimer)
+            this.delayTimer = setTimeout(() => {
+              btn.syncComponentIds.forEach((id, i) => {
+                setTimeout(() => {
+                  if (/\$focus/.test(id)) {
+                    MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
+                  } else {
+                    MKEmitter.emit('reloadData', id)
+                  }
+                }, 20 * i)
+              })
+            }, btn.syncDelay)
+          } else {
+            btn.syncComponentIds.forEach((id, i) => {
+              setTimeout(() => {
+                if (/\$focus/.test(id)) {
+                  MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
+                } else {
+                  MKEmitter.emit('reloadData', id)
+                }
+              }, 20 * i)
+            })
+          }
         } else if (/\$focus/.test(btn.syncComponentId)) {
           MKEmitter.emit('reloadData', btn.syncComponentId.split('$')[0], btn.syncComponentId.split('$')[1])
         } else {

--
Gitblit v1.8.0