diff --git a/src/workbench/browser/src/app/pages/api/group/tree/api-group-tree.component.ts b/src/workbench/browser/src/app/pages/api/group/tree/api-group-tree.component.ts index a303aca8a..c508c4b28 100644 --- a/src/workbench/browser/src/app/pages/api/group/tree/api-group-tree.component.ts +++ b/src/workbench/browser/src/app/pages/api/group/tree/api-group-tree.component.ts @@ -349,7 +349,9 @@ export class ApiGroupTreeComponent implements OnInit, OnDestroy { * @param data GroupApiDataModel */ updateoperateApiEvent(data: GroupApiDataModel) { + let count = 0; if (data.group.length > 0) { + count++; console.log('data.group', data.group); this.storage.run( 'groupBulkUpdate', @@ -361,11 +363,14 @@ export class ApiGroupTreeComponent implements OnInit, OnDestroy { })), ], (result: StorageRes) => { - this.buildGroupTreeData(); + if (--count === 0) { + this.buildGroupTreeData(); + } } ); } if (data.api.length > 0) { + count++; console.log('data.api', data.api); this.storage.run( 'apiDataBulkUpdate', @@ -377,7 +382,9 @@ export class ApiGroupTreeComponent implements OnInit, OnDestroy { })), ], (result: StorageRes) => { - this.buildGroupTreeData(); + if (--count === 0) { + this.buildGroupTreeData(); + } } ); } diff --git a/src/workbench/browser/src/app/pages/api/test/body/api-test-body.component.ts b/src/workbench/browser/src/app/pages/api/test/body/api-test-body.component.ts index 5eacef87c..3e07f2c73 100644 --- a/src/workbench/browser/src/app/pages/api/test/body/api-test-body.component.ts +++ b/src/workbench/browser/src/app/pages/api/test/body/api-test-body.component.ts @@ -26,7 +26,7 @@ import { EoMessageService } from 'eo/workbench/browser/src/app/eoui/message/eo-m import { transferFileToDataUrl } from 'eo/workbench/browser/src/app/utils'; import { NzUploadFile } from 'ng-zorro-antd/upload'; import { EoMonacoEditorComponent } from 'eo/workbench/browser/src/app/shared/components/monaco-editor/monaco-editor.component'; -import { EditorOptions, JoinedEditorOptions } from 'ng-zorro-antd/code-editor'; +import { EditorOptions } from 'ng-zorro-antd/code-editor'; @Component({ selector: 'eo-api-test-body',