vue 导航菜单默认子路由

export default new Router({
routes: [
{
path: '/',
name: 'index',
component: index,
children: [
{
path: '/demo',
name: 'demo',
component: HelloWorld,
meta: {
requireAuth: true
}
},
{
path: '/demo1',
name: 'demo1',
component: HelloWorld1,

},


],
redirect: "/demo"   //这段代码
},

]
})

转载于:https://www.cnblogs.com/whlBooK/p/10605756.html

你可能感兴趣的:(vue 导航菜单默认子路由)