fix: 修复删除的时候开源版报错的问题

This commit is contained in:
CaptainB 2022-01-25 20:17:41 +08:00 committed by zhangdahai112
parent 07507ccd6c
commit 1dab2c7bf5
4 changed files with 33 additions and 4 deletions

View File

@ -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);
}
}
});
}
});
}

View File

@ -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) {

View File

@ -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) {

View File

@ -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() {