1.在二級菜單加一個<router-view></router-view>標簽 (用來承載三級菜單頁面) 2.在項目路由中的meta標簽加一個參數開關來控制是否隱藏二級菜單頁面

{
path: '/structure',
component: Layout,
// redirect: '/permission/page',
alwaysShow: true, // will always show the root menu
name: 'Permission',
meta: {
title: 'structure',
icon: 'blockchain',
roles: ['admin'] // you can set roles in root nav
},
children: [
// 1級頁面 構建列表頁
{
path: 'index',
component: () => import('@/views/baas/chain'),
name: 'Blockchain',
meta: {
title: 'blockchain',
showRole: true
},
children: [
//2級頁面 鏈詳情頁 通道
{
path: 'channel/:id(\\d+)',
component: () => import('@/views/baas/channel'),
name: 'Channel',
meta: {
title: 'channel',
showRole: false,
showRoles: true
},
hidden: true,
children: [
// 3級頁面 查看頁 鏈碼
{
path: 'chaincode/:ids(\\d+)',
component: () => import('@/views/baas/chaincode'),
name: 'Chaincode',
meta: {
title: 'chaincode',
showRoles: false
},
hidden: true
}
]
},
]
},
]
}


