提交 8ddc6a5f authored 作者: vipcxj's avatar vipcxj

fix: 模块中可以配置页面路由

上级 09a7b4e1
...@@ -91,7 +91,7 @@ export const parseLayout = (layout, componentMapper) => { ...@@ -91,7 +91,7 @@ export const parseLayout = (layout, componentMapper) => {
throw new Error('The \'entry\' must be an object with struct: { path: string, datasource: string, params: object }.'); throw new Error('The \'entry\' must be an object with struct: { path: string, datasource: string, params: object }.');
} }
const { path: entryPath, ...state } = layout.entry; const { path: entryPath, ...state } = layout.entry;
if (!entryPath || findRoutesByPath(route.childRoutes).length === 0) { if (!entryPath || findRoutesByPath(route.childRoutes, entryPath).length === 0) {
throw new Error('The \'entry\' should have a valid path property.'); throw new Error('The \'entry\' should have a valid path property.');
} }
route.indexRoute = { route.indexRoute = {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论