fix: env modal auto open while page load

This commit is contained in:
夜鹰 2022-06-28 10:59:00 +08:00
parent 1093438402
commit 979b4c245c
2 changed files with 4 additions and 9 deletions

View File

@ -2,7 +2,7 @@
<nz-sider nzTheme="light" nzWidth="250">
<!-- <div class="side-container"> -->
<nz-content>
<nz-tabset nzCentered>
<nz-tabset nzCentered [nzAnimated]="false">
<nz-tab [nzTitle]="apiTitle">
<ng-template #apiTitle>
<iconpark-icon name="folder-open"></iconpark-icon>

View File

@ -59,15 +59,9 @@ export class EnvComponent implements OnInit, OnDestroy {
return new Promise((resolve) => {
this.storage.run('environmentLoadAllByProjectID', [projectID], async (result: StorageRes) => {
if (result.status === StorageResStatus.success) {
this.envList = result.data || [];
if (!this.envList.length) {
await this.handleAddEnv(projectID);
resolve(true);
return;
}
// await this.handleSwitchEnv(uuid ?? result.data[0].uuid);
resolve(true);
return resolve(result.data || []);
}
return resolve([]);
});
});
}
@ -162,6 +156,7 @@ export class EnvComponent implements OnInit, OnDestroy {
handleShowModal() {
// this.handleAddEnv(null);
console.log('==>>', new Error());
this.isVisible = true;
this.isOpen = false;
// this.getAllEnv(this.envUuid);