From a5c71db861ec548245200767cdbf24839ad2b866 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 18 七月 2023 00:22:23 +0800
Subject: [PATCH] 2023-07-18

---
 src/tabviews/custom/components/card/prop-card/index.jsx |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx
index c95f84f..26f4ea6 100644
--- a/src/tabviews/custom/components/card/prop-card/index.jsx
+++ b/src/tabviews/custom/components/card/prop-card/index.jsx
@@ -32,6 +32,7 @@
   }
 
   loaded = false
+  autoTimer = null
 
   UNSAFE_componentWillMount () {
     const { data, initdata } = this.props
@@ -280,14 +281,23 @@
     }
   }
 
-  autoExec = () => {
+  autoExec = (times) => {
     const { config, data } = this.state
 
     if (!config.wrap.autoExec) return
 
-    setTimeout(() => {
+    let btn = document.getElementById('button' + config.wrap.autoExec)
+
+    clearTimeout(this.autoTimer)
+
+    if (btn) {
       MKEmitter.emit('triggerBtnId', config.wrap.autoExec, data.$$empty ? [] : [data])
-    }, 200)
+    } else if (!times || times < 20) {
+      times = times ? times + 1 : 1
+      this.autoTimer = setTimeout(() => {
+        this.autoExec(times)
+      }, 1000)
+    }
   }
 
   checkTopLine = () => {

--
Gitblit v1.8.0