fix(系统设置):环境列表删除环境时增加确认删除弹框

This commit is contained in:
黎龙鑫 2021-04-29 11:44:14 +08:00 committed by jianxing
parent d929cc484a
commit d51f7b0e69
1 changed files with 12 additions and 4 deletions

View File

@ -258,10 +258,18 @@
},
deleteEnv(environment) {
if (environment.id) {
this.result = this.$get('/api/environment/delete/' + environment.id, () => {
this.$success(this.$t('commons.delete_success'));
this.list();
});
this.$confirm(this.$t('commons.confirm_delete') + environment.name, {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
type: "warning"
}).then(() => {
this.result = this.$get('/api/environment/delete/' + environment.id, () => {
this.$success(this.$t('commons.delete_success'));
this.list();
});
}).catch(() => {
this.$info(this.$t('commons.delete_cancelled'));
})
}
},
getNoRepeatName(name) {