配置route:
{ path: '/page01', name: 'page01', component: page01, children: [ { path: 'page01-a/:id', name: 'page01A', component: page01A }, { path: 'page01-b', name: 'page01B', component: page01B, children: [ { path: 'end', name: 'pageEnd', component: pageEnd } ] } ] }
传参数:
方式一:page01-a/:id 获取:$route.params.id
方式二:$router.push({'path':item.route,query:{'name':'lpp','age':20}});获取:$route.query
方式三:$router.push({name:item.route,params:{'name':'lpp','age':20}}):获取:$route.params
返回上一级:
$router.go(-1)