1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
| import type { Component } from 'vue';
| import type { RouteMeta, RouteRecordRaw } from 'vue-router';
|
| import type { Recordable } from './helper';
|
| /** 路由元信息 */
| interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
| children?: AppRouteRecordRaw[];
| component?: any;
| componentName?: string;
| components?: any;
| fullPath?: string;
| icon?: string;
| id?: any;
| keepAlive?: boolean;
| meta: RouteMeta;
| name: string;
| parentId?: number;
| props?: any;
| sort?: number;
| visible?: boolean;
| }
|
| /**
| * 扩展路由原始对象
| */
| type ExRouteRecordRaw = RouteRecordRaw & {
| parent?: string;
| parents?: string[];
| path?: any;
| };
|
| interface MenuRecordBadgeRaw {
| /**
| * 徽标
| */
| badge?: string;
| /**
| * 徽标类型
| */
| badgeType?: 'dot' | 'normal';
| /**
| * 徽标颜色
| */
| badgeVariants?: 'destructive' | 'primary' | string;
| }
|
| /**
| * 菜单原始对象
| */
| interface MenuRecordRaw extends MenuRecordBadgeRaw {
| /**
| * 激活时的图标名
| */
| activeIcon?: string;
| /**
| * 子菜单
| */
| children?: MenuRecordRaw[];
| /**
| * 是否禁用菜单
| * @default false
| */
| disabled?: boolean;
| /**
| * 图标名
| */
| icon?: Component | string;
| /**
| * 菜单名
| */
| name: string;
| /**
| * 排序号
| */
| order?: number;
| /**
| * 父级路径
| */
| parent?: string;
| /**
| * 所有父级路径
| */
| parents?: string[];
| /**
| * 菜单路径,唯一,可当作key
| */
| path: string;
| /**
| * 菜单参数
| */
| query?: Recordable<any>;
| /**
| * 是否显示菜单
| * @default true
| */
| show?: boolean;
| }
|
| export type {
| AppRouteRecordRaw,
| ExRouteRecordRaw,
| MenuRecordBadgeRaw,
| MenuRecordRaw,
| };
|
|