1、vue-router 做嵌套路由傳值的時(shí)候,跳轉(zhuǎn)到product頁(yè)面的時(shí)候,已經(jīng)能夠收到傳過(guò)來(lái)的值,但是我想跳的是默認(rèn)ProA ,做了redirect重定向,能夠跳轉(zhuǎn)到ProA頁(yè)面,但是product獲取不到傳過(guò)來(lái)的值,比如說(shuō)id的值,這種情況要怎么解決? routes: [{ path: '/', name: 'Index', component: Index
},
{ path: '/product/:id', name: 'Product', redirect: '/product/:id/producta', component: Product, children: [{ path: 'producta', name: 'ProA', component: ProA
}, { path: 'productb', name: 'ProB', component: ProB
}, { path: 'productc', name: 'ProC', component: ProC
}]
}
]
vue-router 的redirect參數(shù)傳遞
慕婉清6462132
2018-07-18 14:40:36