diff --git a/packages/designer/src/project/project.ts b/packages/designer/src/project/project.ts index a1099187b..48d57da95 100644 --- a/packages/designer/src/project/project.ts +++ b/packages/designer/src/project/project.ts @@ -83,7 +83,7 @@ export class Project { const documentInstances = this.data.componentsTree.map((data) => this.createDocument(data)); // TODO: 暂时先读 config tabBar 里的值,后面看整个 layout 结构是否能作为引擎规范 if (this.config?.layout?.props?.tabBar?.items?.length > 0) { - documentInstances.find((i) => i.fileName === this.config.layout.props.tabBar.items[0].path)?.open(); + documentInstances.find((i) => i.fileName === this.config.layout.props.tabBar.items[0].path?.slice(1))?.open(); } else { documentInstances[0].open(); }