{ path: '/conference', component: Layout, redirect: '/conference/Conference', alwaysShow: true, meta: { title: '会议管理', icon: 'iconhuiyi', roles: ['admin'] }, children: [{ path: 'index', component: () => import('@/views/conference/Conference'), name: 'conference_index', meta: { title: '会议管理', icon: 'iconhuiyi', roles: ['admin'] // or you can only set roles in sub nav } }, { hidden: true, path: 'conferenceMember', component: () => import('@/views/conference/ConferenceMember'), name: 'conference_member', meta: { title: '参会人员管理', icon: 'iconhuiyi', roles: ['admin'] // or you can only set roles in sub nav } }] }
Screenshot or Gif(截图或动态图)
我已经设置了alwaysShow:true
但是怎么感觉没啥React呢?始终都是可以点击展开~
1条答案
按热度按时间cgfeq70w1#
有且仅有一个子菜单时会默认隐藏父菜单,alwaysShow: true的作用是显示父菜单