单个路由的配置,用于 routes.ts 中。为了方便起见,路由配置条目可以使用 routeindexlayout 辅助函数创建。

interface RouteConfigEntry {
    caseSensitive?: boolean;
    children?: RouteConfigEntry[];
    file: string;
    id?: string;
    index?: boolean;
    path?: string;
}

属性

caseSensitive?: boolean

如果 path 是大小写敏感的,则应为 true。默认为 false

children?: RouteConfigEntry[]

子路由。

file: string

此路由入口点的路径,相对于 config.appDirectory

id?: string

此路由的唯一 ID。

index?: boolean

如果是索引路由,则应为 true。 这将禁用子路由。

path?: string

此路由用于匹配 URL 路径名的路径。