From b21542ffa283ca3fff2d1d7bdd431eb7722fa5f8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 09 十二月 2021 16:24:32 +0800 Subject: [PATCH] 2021-12-09 --- src/tabviews/zshare/actionList/normalbutton/index.jsx | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 7278fd3..a0668c4 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -1692,7 +1692,7 @@ const { btnconfig, autoMatic } = this.state if (btnconfig) { - if (!autoMatic && btnconfig.setting.display === 'prompt') { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず + if (!autoMatic && (btnconfig.setting.display === 'prompt' || btnconfig.setting.display === 'exec')) { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず this.modelconfirm() } else { this.setState({ @@ -1736,7 +1736,7 @@ this.setState({ btnconfig: _LongParam }, () => { - if (!autoMatic && _LongParam.setting.display === 'prompt') { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず + if (!autoMatic && (_LongParam.setting.display === 'prompt' || _LongParam.setting.display === 'exec')) { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず this.modelconfirm() } else { this.setState({ @@ -1845,17 +1845,21 @@ }) }) - confirm({ - title: this.state.dict['main.action.confirm.tip'], - onOk() { - return new Promise(resolve => { - _this.execSubmit(selines, resolve, result) - }) - }, - onCancel() { - _this.setState({ loading: false }) - } - }) + if (btnconfig.setting.display === 'exec') { + this.execSubmit(selines, () => {}, result) + } else { + confirm({ + title: this.state.dict['main.action.confirm.tip'], + onOk() { + return new Promise(resolve => { + _this.execSubmit(selines, resolve, result) + }) + }, + onCancel() { + _this.setState({ loading: false }) + } + }) + } } /** -- Gitblit v1.8.0