From 6f27c61fa9c8c70c30cc33b7a8f4e373cf2c8f2f Mon Sep 17 00:00:00 2001 From: wwsun Date: Wed, 31 Jul 2024 21:03:47 +0800 Subject: [PATCH] fix: init workspace and viewNode --- packages/core/src/models/abstract-code-workspace.ts | 3 +++ packages/core/src/models/abstract-view-node.ts | 2 +- packages/core/src/models/abstract-workspace.ts | 4 ---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/core/src/models/abstract-code-workspace.ts b/packages/core/src/models/abstract-code-workspace.ts index e5f4590..ab5de26 100644 --- a/packages/core/src/models/abstract-code-workspace.ts +++ b/packages/core/src/models/abstract-code-workspace.ts @@ -41,6 +41,9 @@ export abstract class AbstractCodeWorkspace extends AbstractWorkspace { super(options); this.storeModules = {}; this.serviceModules = {}; + if (options?.files) { + this.addFiles(options.files); + } } /** diff --git a/packages/core/src/models/abstract-view-node.ts b/packages/core/src/models/abstract-view-node.ts index 928009e..641ff63 100644 --- a/packages/core/src/models/abstract-view-node.ts +++ b/packages/core/src/models/abstract-view-node.ts @@ -40,7 +40,7 @@ export abstract class AbstractViewNode