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/table/base-table/index.jsx | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/tabviews/custom/components/table/base-table/index.jsx b/src/tabviews/custom/components/table/base-table/index.jsx index 0693483..7f975c1 100644 --- a/src/tabviews/custom/components/table/base-table/index.jsx +++ b/src/tabviews/custom/components/table/base-table/index.jsx @@ -606,6 +606,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) + } + } + shouldComponentUpdate (nextProps, nextState) { return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) } @@ -621,6 +640,8 @@ if (config.setting.useMSearch) { MKEmitter.addListener('searchRefresh', this.searchRefresh) } + + this.autoExec() } /** -- Gitblit v1.8.0