fix(接口定义):修复删除CASE时没有“确认删除”弹窗 (#1571)

Co-authored-by: 黎龙鑫 <lilongxinya@163.com>
This commit is contained in:
Ambitiousliga 2021-03-05 17:32:11 +08:00 committed by GitHub
parent 2cb7aa6256
commit a687ccce8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -473,9 +473,16 @@ export default {
}, },
handleDelete(apiCase) { handleDelete(apiCase) {
// if (this.trashEnable) { // if (this.trashEnable) {
this.$get('/api/testcase/delete/' + apiCase.id, () => { this.$alert(this.$t('api_test.definition.request.delete_confirm') + ' ' + apiCase.name + " ", '', {
this.$success(this.$t('commons.delete_success')); confirmButtonText: this.$t('commons.confirm'),
this.initTable(); callback: (action) => {
if (action === 'confirm') {
this.$get('/api/testcase/delete/' + apiCase.id, () => {
this.$success(this.$t('commons.delete_success'));
this.initTable();
});
}
}
}); });
return; return;
}, },