Optimize router

This commit is contained in:
2023-10-17 11:32:39 +08:00
parent a090327429
commit 75962aafc9
5 changed files with 91 additions and 97 deletions

7
src/global.d.ts vendored
View File

@@ -10,9 +10,10 @@ interface ImportMeta {
readonly env: ImportMetaEnv
}
type ToolsJsonObject = {
type RouteJsonObject = {
path: string
id: string
id?: string
element?: React.JSX.Element
component?: React.ComponentType
name?: string
titlePrefix?: string
@@ -21,7 +22,7 @@ type ToolsJsonObject = {
icon?: IconComponent
menu?: boolean
auth?: boolean
children?: ToolsJsonObject[]
children?: RouteJsonObject[]
}
type RouteHandle = {