feat: Dynamically get the menu from the back end
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
export type * from './router';
|
||||
export type * from './ui';
|
||||
export type * from './user';
|
||||
export type * from '@vben-core/typings';
|
||||
|
13
packages/types/src/router.ts
Normal file
13
packages/types/src/router.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import type { Component } from 'vue';
|
||||
|
||||
// 定义递归类型以将 RouteRecordRaw 的 component 属性更改为 string
|
||||
type RouteRecordStringComponent<T = string> = {
|
||||
children?: RouteRecordStringComponent<T>[];
|
||||
component: T;
|
||||
} & Omit<RouteRecordRaw, 'children' | 'component'>;
|
||||
|
||||
type ComponentRecordType = Record<string, () => Promise<Component>>;
|
||||
|
||||
export type { ComponentRecordType, RouteRecordStringComponent };
|
Reference in New Issue
Block a user