1.需要在 Router 的參數中使用 children 配置:
PS:登錄成功後跳轉到action組件,action組件嵌套了多個子組件,渲染左邊的導航欄(fixed)和默認渲染index的內容。相當於只有登錄和action兩個頁面
{
path: ‘/action’, component: action, name: ‘action’,
children: [
{ path: ‘/’, component: index, name: ‘index’ },
{ path: ‘index’, component: index, name: ‘index’}
]
}