From 3e13e3e61854671fce6aac45679e1b7252126105 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 24 十二月 2023 23:41:01 +0800
Subject: [PATCH] Merge branch 'master' into positec

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

diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx
index 1e3d074..4315f80 100644
--- a/src/tabviews/custom/components/card/data-card/index.jsx
+++ b/src/tabviews/custom/components/card/data-card/index.jsx
@@ -236,6 +236,8 @@
     }
 
     this.initExec()
+
+    this.autoExec()
   }
 
   shouldComponentUpdate (nextProps, nextState) {
@@ -330,6 +332,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