fix: path with /

This commit is contained in:
wanying.jwy 2020-09-22 17:01:36 +08:00
parent 79b70420fb
commit 2470363010

View File

@ -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();
}