style(接口自动化): 修复数据源被删除显示问题
This commit is contained in:
parent
50ea7f76bf
commit
04e30ba664
|
@ -235,15 +235,22 @@
|
|||
this.$refs.environmentConfig.open(getCurrentProjectID());
|
||||
},
|
||||
initDataSource() {
|
||||
let flag = false;
|
||||
for (let i in this.environments) {
|
||||
if (this.environments[i].id === this.request.environmentId) {
|
||||
this.databaseConfigsOptions = [];
|
||||
this.environments[i].config.databaseConfigs.forEach(item => {
|
||||
if (item.id === this.request.dataSourceId) {
|
||||
flag = true;
|
||||
}
|
||||
this.databaseConfigsOptions.push(item);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
this.request.dataSourceId = undefined;
|
||||
}
|
||||
},
|
||||
setDataSource() {
|
||||
for (let item of this.databaseConfigsOptions) {
|
||||
|
|
Loading…
Reference in New Issue