This commit is contained in:
dap
2025-01-15 15:22:21 +08:00
53 changed files with 267 additions and 126 deletions

View File

@@ -97,6 +97,10 @@ interface RouteMeta {
* 菜单可以看到但是访问会被重定向到403
*/
menuVisibleWithForbidden?: boolean;
/**
* 不使用基础布局(仅在顶级生效)
*/
noBasicLayout?: boolean;
/**
* 在新窗口打开
*/
@@ -116,10 +120,13 @@ interface RouteMeta {
}
// 定义递归类型以将 RouteRecordRaw 的 component 属性更改为 string
type RouteRecordStringComponent<T = string> = {
type RouteRecordStringComponent<T = string> = Omit<
RouteRecordRaw,
'children' | 'component'
> & {
children?: RouteRecordStringComponent<T>[];
component: T;
} & Omit<RouteRecordRaw, 'children' | 'component'>;
};
type ComponentRecordType = Record<string, () => Promise<Component>>;