wujingjing
2025-04-09 f17a10fa1490e4a1840997900770a43ce2ac7313
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
/**
 * 配置类型为菜单的路由配置
 * name 为组件名,name不能重复,重复可能找不到
 *
 */
 
import { deepClone } from "../utils/other";
 
export type PathRouteType = {
    name: String;
    isKeepAlive: Boolean;
    isAffix: Boolean;
    path: String;
    component: String;
    redirect?: String;
    showTitle:boolean;
    showBack:boolean;
};
 
const pathArr = window.route;
const cloneData = deepClone(pathArr);
const pathArrMap = pathArr.map((item) => {
    const path = item.path;
    const mapArr: [String, PathRouteType] = [path, item];
    return mapArr;
});
 
export const pathMap = new Map(pathArrMap);