|
|
@@ -7,14 +7,14 @@ const layout = () => import("@/layout/index.vue");
|
|
7
|
7
|
export async function formatRoutes(aMenu: any, parentId?: string) {
|
|
8
|
8
|
await aMenu.forEach((item: any) => {
|
|
9
|
9
|
const haveChild: boolean = item.children?.length > 0;
|
|
10
|
|
- interface RouteObject {
|
|
|
10
|
+ interface RouteObject {
|
|
11
|
11
|
path: string;
|
|
12
|
12
|
name: string;
|
|
13
|
13
|
redirect: string;
|
|
14
|
14
|
meta: any;
|
|
15
|
15
|
children?: any;
|
|
16
|
16
|
component?: () => Promise<any>;
|
|
17
|
|
- }
|
|
|
17
|
+ }
|
|
18
|
18
|
const route: RouteObject = {
|
|
19
|
19
|
path: item.path,
|
|
20
|
20
|
name: item.name,
|
|
|
@@ -24,7 +24,7 @@ export async function formatRoutes(aMenu: any, parentId?: string) {
|
|
24
|
24
|
},
|
|
25
|
25
|
component: haveChild ? layout : () => import(`@/views${item.path}/index.vue`)
|
|
26
|
26
|
};
|
|
27
|
|
- if(item.path == "/jiuz" || item.path == "/fangxkh"){
|
|
|
27
|
+ if (item.path == "/jiuz" || item.path == "/fangxkh" || item.path == "/Inventory") {
|
|
28
|
28
|
delete route.component;
|
|
29
|
29
|
}
|
|
30
|
30
|
|