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/zshare/actionList/exceloutbutton/index.jsx |    1 +
 src/tabviews/custom/components/card/prop-card/index.jsx |   16 +++++++++++++---
 src/tabviews/zshare/actionList/normalbutton/index.jsx   |    1 +
 src/tabviews/zshare/actionList/printbutton/index.jsx    |    1 +
 4 files changed, 16 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 = () => {
diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
index 8ccf673..4a41436 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -1250,6 +1250,7 @@
     return (
       <Button
         type={type}
+        id={'button' + btn.uuid}
         title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')}
         loading={loading}
         disabled={disabled}
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 9ac4aef..3d474fb 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -3092,6 +3092,7 @@
       <Button
         type={type}
         icon={icon}
+        id={'button' + btn.uuid}
         title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')}
         loading={loading}
         disabled={disabled}
diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index ef1052c..850c3d3 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -2353,6 +2353,7 @@
     return <>
       <Button
         type={type}
+        id={'button' + btn.uuid}
         title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')}
         loading={loading}
         disabled={disabled}

--
Gitblit v1.8.0