wujingjing
2024-07-08 bb37b51088dffdfb493906de541b5251e1d969d1
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
 
/**
 * 配置类型为菜单的路由配置
 * name 为组件名,name不能重复,重复可能找不到
 *
 */
 
export type PathRouteType = {
    name: String;
    isKeepAlive: Boolean;
    isAffix: Boolean;
    path: String;
    component: String;
    redirect?: String;
};
 
const pathArr = window.route;
 
const pathArrMap = pathArr.map((item) => {
    const path = item.path;
    const mapArr: [String, PathRouteType] = [path, item];
    return mapArr;
});
 
export const pathMap = new Map(pathArrMap);