注意:写vue路由的子路由时,路径不能加上/;如:】
~~~
const routes = [
{
path: '/foo',
component: foo,
children: [
{
path: 'child', //这里没有斜杆
component: fooChild
}
]
},
{path: '/bar', component: bar}
];
~~~