|
|
@ -7,7 +7,8 @@ export function filterMenu(menuList) { |
|
|
...menu, |
|
|
...menu, |
|
|
children: menu.children ? filterMenu(menu.children) : [] |
|
|
children: menu.children ? filterMenu(menu.children) : [] |
|
|
})) |
|
|
})) |
|
|
.sort((a, b) => a.id - b.id); // 按 id 升序
|
|
|
|
|
|
|
|
|
// 按 id 升序
|
|
|
|
|
|
// .sort((a, b) => a.id - b.id);
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 过滤 只获得第三级的菜单
|
|
|
// 过滤 只获得第三级的菜单
|
|
|
|