1.配置路由
const routes = [
{
path: '/User',
component: User,
children: [{ path: 'OP1', component: OP1 },//注意子路由的路径写法这里不加/
{ path: 'OP2', component: OP2 }
]
}
]
2.父路由里配置子路由显示的地方<router-view></router-view>