在父routes里面增加一个属性children,然后是一个数组,配置一个子路由,子路由的路径path不能有/,直接写路径名.
如chilidren:[path:"Student" component:Student ]
然后在使用router-link时to的路径要加上父路径
如<router-link to:"/School/Student"></router-link>
在父routes里面增加一个属性children,然后是一个数组,配置一个子路由,子路由的路径path不能有/,直接写路径名.
如chilidren:[path:"Student" component:Student ]
然后在使用router-link时to的路径要加上父路径
如<router-link to:"/School/Student"></router-link>