From 6092c17b4571e1082d1272fa3104c780af66453d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 17 十二月 2023 11:10:19 +0800
Subject: [PATCH] 2023-12-17

---
 src/tabviews/custom/components/table/normal-table/index.jsx |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx
index a1492a3..595c5e5 100644
--- a/src/tabviews/custom/components/table/normal-table/index.jsx
+++ b/src/tabviews/custom/components/table/normal-table/index.jsx
@@ -199,6 +199,8 @@
     }
 
     this.initExec()
+
+    this.autoExec()
   }
 
   /**
@@ -301,6 +303,25 @@
     }
   }
 
+  autoExec = (times) => {
+    const { config } = this.state
+
+    if (!config.wrap.autoExec) return
+
+    let btn = document.getElementById('button' + config.wrap.autoExec)
+
+    this.autoTimer && clearTimeout(this.autoTimer)
+
+    if (btn) {
+      MKEmitter.emit('triggerBtnId', config.wrap.autoExec, [])
+    } else if (!times || times < 20) {
+      times = times ? times + 1 : 1
+      this.autoTimer = setTimeout(() => {
+        this.autoExec(times)
+      }, 1000)
+    }
+  }
+
   transferSyncData = (syncId) => {
     const { config } = this.state
 

--
Gitblit v1.8.0