This commit is contained in:
Li1304553726 2025-04-08 19:06:51 +08:00
parent 5abb19f467
commit 1a26202e34
1 changed files with 42 additions and 43 deletions

View File

@ -26,7 +26,6 @@ interface CustomIndexRouteObject extends IndexRouteObject {
name?: string;
breadcrumb?: string;
}
export interface CustomNonIndexRouteObject extends NonIndexRouteObject {
name?: string;
children?: CustomRouteObject[];
@ -39,51 +38,51 @@ export type CustomRouteObject =
| CustomIndexRouteObject
| CustomNonIndexRouteObject;
export const routes: CustomRouteObject[] = [
// {
// path: "/",
// errorElement: <ErrorPage />,
// handle: {
// crumb() {
// return <Link to={"/"}>主页</Link>;
// },
// },
// children: [
// {
// element: <MainLayout></MainLayout>,
// children: [
// {
// index: true,
// element:<Dashboard></Dashboard>,
// },
// {
// path: "/staffinformation",
// element: <StaffInformation></StaffInformation>,
// },
// {
// path: "/staff",
// element: <StaffMessage></StaffMessage>,
// },
// {
// path: "/systemlog",
// element: <SystemLogPage></SystemLogPage>,
// },
// {
// path: "/admin",
// element: <AdminLayout></AdminLayout>,
// children:adminRoute.children
// },
{
path: "/",
errorElement: <ErrorPage />,
handle: {
crumb() {
return <Link to={"/"}></Link>;
},
},
children: [
{
element: <MainLayout></MainLayout>,
children: [
{
index: true,
element:<Dashboard></Dashboard>,
},
{
path: "/staffinformation",
element: <StaffInformation></StaffInformation>,
},
{
path: "/staff",
element: <StaffMessage></StaffMessage>,
},
{
path: "/systemlog",
element: <SystemLogPage></SystemLogPage>,
},
{
path: "/admin",
element: <AdminLayout></AdminLayout>,
children:adminRoute.children
},
// ],
// },
],
},
// ],
// },
// {
// path: "/login",
// breadcrumb: "登录",
// element: <LoginPage></LoginPage>,
// },
],
},
{
path: "/login",
breadcrumb: "登录",
element: <LoginPage></LoginPage>,
},
{
index: true,
path: "/",