提交 | 用户 | age
|
2f6253
|
1 |
import type { RouteRecordRaw } from 'vue-router'; |
陈 |
2 |
import { RoleEnum } from '/@/enums/roleEnum'; |
|
3 |
export interface RouteMeta { |
|
4 |
// title |
|
5 |
title: string; |
|
6 |
// Whether to ignore permissions |
|
7 |
ignoreAuth?: boolean; |
|
8 |
// role info |
|
9 |
roles?: RoleEnum[]; |
|
10 |
// Whether not to cache |
|
11 |
ignoreKeepAlive?: boolean; |
|
12 |
// Is it fixed on tab |
|
13 |
affix?: boolean; |
|
14 |
// icon on tab |
|
15 |
icon?: string; |
|
16 |
// Jump address |
|
17 |
frameSrc?: string; |
|
18 |
// Outer link jump address |
|
19 |
externalLink?: string; |
|
20 |
|
|
21 |
// current page transition |
|
22 |
transitionName?: string; |
|
23 |
|
|
24 |
// Whether the route has been dynamically added |
|
25 |
hideBreadcrumb?: boolean; |
|
26 |
|
|
27 |
// disabled redirect |
|
28 |
disabledRedirect?: boolean; |
2f268c
|
29 |
|
陈 |
30 |
// close loading |
|
31 |
afterCloseLoading?: boolean; |
b8353f
|
32 |
// Is it in the tab |
5f2a92
|
33 |
inTab?: boolean; |
b8353f
|
34 |
// Carrying parameters |
V |
35 |
carryParam?: boolean; |
2f6253
|
36 |
} |
陈 |
37 |
|
|
38 |
export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> { |
|
39 |
meta: RouteMeta; |
|
40 |
component?: any; |
|
41 |
components?: any; |
|
42 |
children?: AppRouteRecordRaw[]; |
|
43 |
props?: any; |
31e271
|
44 |
fullPath?: string; |
2f6253
|
45 |
} |
a3887f
|
46 |
export interface MenuTag { |
V |
47 |
type?: 'primary' | 'error' | 'warn' | 'success'; |
|
48 |
content?: string; |
|
49 |
dot?: boolean; |
|
50 |
} |
2f6253
|
51 |
|
陈 |
52 |
export interface Menu { |
|
53 |
name: string; |
|
54 |
|
|
55 |
icon?: string; |
|
56 |
|
|
57 |
path: string; |
|
58 |
|
|
59 |
disabled?: boolean; |
|
60 |
|
|
61 |
children?: Menu[]; |
|
62 |
|
|
63 |
orderNo?: number; |
|
64 |
|
|
65 |
roles?: RoleEnum[]; |
|
66 |
|
|
67 |
meta?: Partial<RouteMeta>; |
a3887f
|
68 |
|
V |
69 |
tag?: MenuTag; |
2f6253
|
70 |
} |
陈 |
71 |
export interface MenuModule { |
|
72 |
orderNo?: number; |
|
73 |
menu: Menu; |
|
74 |
} |
|
75 |
|
ecfb70
|
76 |
interface RouteModule { |
V |
77 |
layout: AppRouteRecordRaw; |
|
78 |
routes: AppRouteRecordRaw[]; |
9b61e8
|
79 |
children?: AppRouteRecordRaw[]; |
V |
80 |
component?: any; |
2f6253
|
81 |
} |
ecfb70
|
82 |
|
V |
83 |
export type AppRouteModule = RouteModule | AppRouteRecordRaw; |