开启TopNav没有子菜单情况隐藏侧边栏

This commit is contained in:
RuoYi
2022-03-06 09:05:56 +08:00
parent 4feb0adb6e
commit 8b3d75a6a0
28 changed files with 59 additions and 54 deletions

View File

@@ -22,12 +22,7 @@ const permission = {
state.defaultRoutes = constantRoutes.concat(routes)
},
SET_TOPBAR_ROUTES: (state, routes) => {
// 顶部导航菜单默认添加统计报表栏指向首页
const index = [{
path: 'index',
meta: { title: '统计报表', icon: 'dashboard' }
}]
state.topbarRouters = routes.concat(index);
state.topbarRouters = routes
},
SET_SIDEBAR_ROUTERS: (state, routes) => {
state.sidebarRouters = routes