|
@@ -1,6 +1,5 @@
|
|
|
-import type { RouteRecordRaw } from 'vue-router';
|
|
|
+import type { RouteRecordRaw, RouteMeta } from 'vue-router';
|
|
|
import { RoleEnum } from '/@/enums/roleEnum';
|
|
|
-
|
|
|
import { defineComponent } from 'vue';
|
|
|
|
|
|
export type Component<T extends any = any> =
|
|
@@ -8,49 +7,6 @@ export type Component<T extends any = any> =
|
|
|
| (() => Promise<typeof import('*.vue')>)
|
|
|
| (() => Promise<T>);
|
|
|
|
|
|
-export interface RouteMeta {
|
|
|
- // title
|
|
|
- title: string;
|
|
|
- // Whether to ignore permissions
|
|
|
- ignoreAuth?: boolean;
|
|
|
- // role info
|
|
|
- roles?: RoleEnum[];
|
|
|
- // Whether not to cache
|
|
|
- ignoreKeepAlive?: boolean;
|
|
|
- // Is it fixed on tab
|
|
|
- affix?: boolean;
|
|
|
- // icon on tab
|
|
|
- icon?: string;
|
|
|
-
|
|
|
- frameSrc?: string;
|
|
|
-
|
|
|
- // current page transition
|
|
|
- transitionName?: string;
|
|
|
-
|
|
|
- // Whether the route has been dynamically added
|
|
|
- hideBreadcrumb?: boolean;
|
|
|
-
|
|
|
- // Hide submenu
|
|
|
- hideChildrenInMenu?: boolean;
|
|
|
-
|
|
|
- // Carrying parameters
|
|
|
- carryParam?: boolean;
|
|
|
-
|
|
|
- // Used internally to mark single-level menus
|
|
|
- single?: boolean;
|
|
|
-
|
|
|
- // Currently active menu
|
|
|
- currentActiveMenu?: string;
|
|
|
-
|
|
|
- // Never show in tab
|
|
|
- hideTab?: boolean;
|
|
|
-
|
|
|
- // Never show in menu
|
|
|
- hideMenu?: boolean;
|
|
|
-
|
|
|
- isLink?: boolean;
|
|
|
-}
|
|
|
-
|
|
|
// @ts-ignore
|
|
|
export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
|
|
|
name: string;
|
|
@@ -61,6 +17,7 @@ export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
|
|
|
props?: Recordable;
|
|
|
fullPath?: string;
|
|
|
}
|
|
|
+
|
|
|
export interface MenuTag {
|
|
|
type?: 'primary' | 'error' | 'warn' | 'success';
|
|
|
content?: string;
|