Commit 50915c9754473ba9096b3b1cceedf0d7e7212ad9
1 parent
82c31863
fix(menu): fix the menu disappeared in background mode
Showing
1 changed file
with
3 additions
and
1 deletions
src/router/helper/menuHelper.ts
@@ -47,13 +47,15 @@ export function transformRouteToMenu(routeModList: AppRouteModule[]) { | @@ -47,13 +47,15 @@ export function transformRouteToMenu(routeModList: AppRouteModule[]) { | ||
47 | const list = treeMap(routeList, { | 47 | const list = treeMap(routeList, { |
48 | conversion: (node: AppRouteRecordRaw) => { | 48 | conversion: (node: AppRouteRecordRaw) => { |
49 | const { meta: { title, hideMenu = false } = {} } = node; | 49 | const { meta: { title, hideMenu = false } = {} } = node; |
50 | + | ||
50 | return { | 51 | return { |
51 | ...(node.meta || {}), | 52 | ...(node.meta || {}), |
52 | name: title, | 53 | name: title, |
53 | hideMenu, | 54 | hideMenu, |
55 | + path: node.path, | ||
54 | }; | 56 | }; |
55 | }, | 57 | }, |
56 | }); | 58 | }); |
57 | joinParentPath(list); | 59 | joinParentPath(list); |
58 | - return list; | 60 | + return cloneDeep(list); |
59 | } | 61 | } |