提交 2896895e 作者: 翁进城

增加路由/重写向到/home的判断

上级 16cdcd70
...@@ -25,11 +25,7 @@ export const routerList: Array<RouteObject & RouteObjectType> = [ ...@@ -25,11 +25,7 @@ export const routerList: Array<RouteObject & RouteObjectType> = [
}, },
{ {
path: '/', path: '/',
element: ( element: <LayoutView>{location.hash === '#/' && <Navigate to='/home' />}</LayoutView>,
<LayoutView>
<Navigate to='/home' />
</LayoutView>
),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
children: [ children: [
{ {
...@@ -41,9 +37,9 @@ export const routerList: Array<RouteObject & RouteObjectType> = [ ...@@ -41,9 +37,9 @@ export const routerList: Array<RouteObject & RouteObjectType> = [
element: <JobServices />, element: <JobServices />,
}, },
{ {
path: 'mall', path: '/mall',
element: <Mall /> element: <Mall />,
} },
], ],
} },
]; ];
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论