2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 10:17:17 +08:00

feat: 优化菜单排序

This commit is contained in:
2025-05-19 02:15:15 +08:00
parent aab5cf7e94
commit a997d548f7
2 changed files with 5 additions and 2 deletions

View File

@@ -47,7 +47,10 @@ function getMenuItem(route: RouteType, basePath = ''): MenuItem {
}
const visibleChildren = route.children
? route.children.filter((item: RouteType) => item.name && !item.isHidden)
? route.children.filter(
(item: RouteType) =>
item.name && !item.isHidden && !permissionStore.hiddenRoutes.includes(item.name)
)
: []
if (!visibleChildren.length) return menuItem

View File

@@ -9,7 +9,7 @@ export default {
meta: {
title: 'Toolbox',
icon: 'mdi:tools',
order: 80
order: 90
},
children: [
{