import type { RouteRecordRaw, RouteMeta } from 'vue-router' import type { defineComponent } from 'vue' export type Component = ReturnType | (() => Promise) | (() => Promise) // @ts-expect-error export interface AppRouter extends Omit { keepAlive?: boolean visible?: boolean icon?: string name?: string key?: string sort?: number parent?: AppRouter | null parentId?: number | string menuId?: number | string meta: RouteMeta component?: Component | string components?: Component componentName?: string children?: AppRouter[] props?: Recordable, path?: string, fullPath?: string, hidden?: boolean, type?: string | null, typeName?: string | null, menuName?: string | null menuType?: string | null } // export interface AppRouter { // keepAlive?: boolean, // 缓存 // component?: RawRouteComponent | string | null | undefined | any, // 组件 // children?: AppRouter[], // 子路由 // path?: string, // 路径 // redirect?: string, // 重定向 // isFrame?: number, // 外链 // target?: string // 外链打开方式 新标签打开还是当前页面打开 // key?: string, // hidden: boolean, // 是否隐藏 // title?: string // 标题 // // visible?: boolean // // // icon?: string // 图标 // name: string // 路由name // sort?: number // 排序 // parentId?: number // 父节点 // // component?: Component | string // // components?: Component // // componentName?: string // // hideChildrenInMenu?: boolean, // 隐藏下级节点 // meta?: RouteMeta, // 信息 // // props?: Recordable // // fullPath?: string // 全路径 // }