serv\web-侧边栏 标签统一

This commit is contained in:
2025-10-27 16:21:00 +08:00
parent e50de4a277
commit 5fa4e1cd42
47 changed files with 1933 additions and 1307 deletions

View File

@@ -17,6 +17,8 @@ const LAYOUT_MAP: Record<string, () => Promise<any>> = {
'BasicLayout': () => import('@/layouts/BasicLayout.vue'),
// 导航布局(新版,顶部导航+动态侧边栏)
'NavigationLayout': () => import('@/layouts/NavigationLayout.vue'),
// 侧边栏布局管理后台专用顶层SIDEBAR菜单
'SidebarLayout': () => import('@/layouts/SidebarLayout.vue'),
// 空白布局
'BlankLayout': () => import('@/layouts/BlankLayout.vue'),
// 页面布局
@@ -126,10 +128,11 @@ function generateRouteFromMenu(menu: SysMenu, isTopLevel = true): RouteRecordRaw
route.component = getComponent(layout);
} else if (hasChildren && isTopLevel) {
// 如果有子菜单但没有指定布局,根据菜单类型选择默认布局
if (isTopLevel && menu.type === MenuType.NAVIGATION) {
if (menu.type === MenuType.NAVIGATION) {
route.component = getComponent('NavigationLayout');
} else if (menu.type === MenuType.SIDEBAR) {
route.component = getComponent('BlankLayout');
} else if (menu.type === MenuType.SIDEBAR && !menu.parentID) {
// 顶层SIDEBAR菜单管理后台默认使用SidebarLayout
route.component = getComponent('SidebarLayout');
} else {
route.component = getComponent('BasicLayout');
}