import { BrowserRouterProps } from 'react-router-dom'; import { RouteAccess } from '../../../features/routeAccess'; export interface IBrowserRouterProps extends BrowserRouterProps { namespace: string; oakDisablePulldownRefresh?: boolean; customRouter?: boolean; } export type IMeta = { /** * Web document title literal. */ title?: string; /** * Web document title i18n key generated by the router compiler or configured on route. */ titleI18nKey?: string; Icon?: React.FC; oakDisablePulldownRefresh?: boolean; access?: RouteAccess; }; export interface IRouter { path: string; /** * 页面在 namespace 下的完整路径,供标题/i18n 等元数据逻辑使用 */ fullPath?: string; /** * 是否为根路由 */ isFirst?: boolean; /** * 兼容字段:namespace wrapper route 里通常是 URL 前缀,页面 route 里通常是 namespace key。 * 新代码应优先使用 namespaceKey / namespacePath。 */ namespace?: string; /** * namespace 业务标识,例如 console / frontend,用于页面 i18n 等 key 型逻辑。 */ namespaceKey?: string; /** * namespace URL 挂载前缀,例如 /console / /,用于导航与路由匹配。 */ namespacePath?: string; customRouter?: boolean; Component?: React.FC | (() => any); /** * 当前路由是否全屏显示 */ isFullPage?: boolean; /** * meta */ meta?: IMeta; children?: IRouter[]; }