2024-07-11 11:00:51 +08:00
|
|
|
import {
|
2024-12-30 08:26:40 +08:00
|
|
|
createBrowserRouter,
|
|
|
|
IndexRouteObject,
|
|
|
|
Link,
|
|
|
|
NonIndexRouteObject,
|
2025-02-24 19:10:38 +08:00
|
|
|
useParams,
|
2024-07-11 11:00:51 +08:00
|
|
|
} from "react-router-dom";
|
2024-07-22 10:07:05 +08:00
|
|
|
import ErrorPage from "../app/error";
|
2025-04-02 16:14:30 +08:00
|
|
|
import DeptSettingPage from "../app/admin/deptsettingpage/page";
|
2024-09-10 10:31:24 +08:00
|
|
|
interface CustomIndexRouteObject extends IndexRouteObject {
|
2024-12-30 08:26:40 +08:00
|
|
|
name?: string;
|
|
|
|
breadcrumb?: string;
|
2024-09-10 10:31:24 +08:00
|
|
|
}
|
2024-12-30 08:26:40 +08:00
|
|
|
interface CustomIndexRouteObject extends IndexRouteObject {
|
|
|
|
name?: string;
|
|
|
|
breadcrumb?: string;
|
2024-09-10 10:31:24 +08:00
|
|
|
}
|
|
|
|
|
2024-12-30 08:26:40 +08:00
|
|
|
export interface CustomNonIndexRouteObject extends NonIndexRouteObject {
|
|
|
|
name?: string;
|
|
|
|
children?: CustomRouteObject[];
|
|
|
|
breadcrumb?: string;
|
|
|
|
handle?: {
|
|
|
|
crumb: (data?: any) => void;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
export type CustomRouteObject =
|
|
|
|
| CustomIndexRouteObject
|
|
|
|
| CustomNonIndexRouteObject;
|
|
|
|
export const routes: CustomRouteObject[] = [
|
|
|
|
{
|
2025-04-02 21:59:19 +08:00
|
|
|
path: "/",
|
|
|
|
element: <DeptSettingPage></DeptSettingPage>,
|
2024-12-30 08:26:40 +08:00
|
|
|
errorElement: <ErrorPage />,
|
2025-04-02 21:59:19 +08:00
|
|
|
},
|
2024-12-30 08:26:40 +08:00
|
|
|
];
|
2024-09-09 18:48:07 +08:00
|
|
|
|
2024-09-10 10:31:24 +08:00
|
|
|
export const router = createBrowserRouter(routes);
|