From 1dab2c7bf562e68ff567f297da90388da45bd1aa Mon Sep 17 00:00:00 2001 From: CaptainB Date: Tue, 25 Jan 2022 20:17:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E5=BC=80=E6=BA=90=E7=89=88=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/automation/scenario/ApiScenarioList.vue | 10 +++++++++- .../api/definition/components/list/ApiList.vue | 9 ++++++++- .../performance/test/PerformanceTestList.vue | 9 ++++++++- .../components/track/case/components/TestCaseList.vue | 9 ++++++++- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue index b8a612a99f..773094b0c1 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -1151,7 +1151,15 @@ export default { // 删除提供列表删除和全部版本删除 this.$refs.apiDeleteConfirm.open(row, alertMsg); } else { - this._handleDelete(row, false); + this.$alert(alertMsg, '', { + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), + callback: (action) => { + if (action === 'confirm') { + this._handleDelete(row, false); + } + } + }); } }); } diff --git a/frontend/src/business/components/api/definition/components/list/ApiList.vue b/frontend/src/business/components/api/definition/components/list/ApiList.vue index e6902bc9a7..37277f7b6b 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiList.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiList.vue @@ -818,7 +818,14 @@ export default { // 删除提供列表删除和全部版本删除 this.$refs.apiDeleteConfirm.open(api, this.$t('api_test.definition.request.delete_confirm')); } else { - this._handleDelete(api, false); + this.$alert(this.$t('api_test.definition.request.delete_confirm') + ' ' + api.name + " ?", '', { + confirmButtonText: this.$t('commons.confirm'), + callback: (action) => { + if (action === 'confirm') { + this._handleDelete(api, false); + } + } + }); } }, _handleDelete(api, deleteCurrentVersion) { diff --git a/frontend/src/business/components/performance/test/PerformanceTestList.vue b/frontend/src/business/components/performance/test/PerformanceTestList.vue index 18e751f345..214ddaac57 100644 --- a/frontend/src/business/components/performance/test/PerformanceTestList.vue +++ b/frontend/src/business/components/performance/test/PerformanceTestList.vue @@ -260,7 +260,14 @@ export default { // 删除提供列表删除和全部版本删除 this.$refs.apiDeleteConfirm.open(test, this.$t('load_test.delete_confirm')); } else { - this._handleDelete(test, false); + this.$alert(this.$t('load_test.delete_confirm') + test.name + "?", '', { + confirmButtonText: this.$t('commons.confirm'), + callback: (action) => { + if (action === 'confirm') { + this._handleDelete(test, false); + } + } + }); } }, _handleDelete(test, deleteCurrentVersion) { diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index 3eae7156e9..1099acc2b8 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -901,7 +901,14 @@ export default { // 删除提供列表删除和全部版本删除 this.$refs.apiDeleteConfirm.open(testCase, this.$t('test_track.case.delete_confirm')); } else { - this._handleDeleteVersion(testCase, false); + this.$alert(this.$t('test_track.case.delete_confirm') + '\'' + testCase.name + '\'' + "?", '', { + confirmButtonText: this.$t('commons.confirm'), + callback: (action) => { + if (action === 'confirm') { + this._handleDeleteVersion(testCase, false); + } + } + }); } }, batchReduction() {