const routes = [
{
path: '/',
name:'main',
component: Main,
children:[
{
path:'/',
name:'home',
component:() => import('@/views/Home/Home.vue'),
}
]
},
]
如图所示,左侧为导航栏组件,每个按钮实现跳转路由,右侧为显示区域,但是会重复显示