style(项目设置): 优化项目设置中环境删除的弹窗

--bug=1015267 --user=宋天阳 【接口测试】删除环境配置时的二次提示信息的字体和大小和其他的页面的提示不一致
https://www.tapd.cn/55049933/s/1210812
This commit is contained in:
song-tianyang 2022-07-25 18:09:58 +08:00 committed by 建国
parent 5d3a48db76
commit 29ad946ad5
1 changed files with 18 additions and 15 deletions

View File

@ -107,21 +107,24 @@ export default {
listenGoBack(this.close);
},
deleteEnvironment(environment, index) {
if (this.delDialogVisible === false) {
this.delDialogVisible = true;
return;
}
this.ifCreate = false;
if (environment.id) {
this.result = this.$get('/api/environment/delete/' + environment.id, () => {
this.$success(this.$t('commons.delete_success'));
this.getEnvironments();
this.delDialogVisible = false;
});
} else {
this.environments.splice(index, 1);
this.delDialogVisible = false;
}
this.$alert(this.$t('commons.confirm_delete') + environment.name, '', {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
callback: (action) => {
if (action === 'confirm') {
if (environment.id) {
this.result = this.$get('/api/environment/delete/' + environment.id, () => {
this.$success(this.$t('commons.delete_success'));
this.getEnvironments();
this.delDialogVisible = false;
});
} else {
this.environments.splice(index, 1);
this.delDialogVisible = false;
}
}
}
});
},
copyEnvironment(environment) {