今天在用路由傳遞參數時this
this.$router.push({path: 'list', params: {list: list}})component
使用上面的辦法this.$route.params.list 爲undefindrouter
而使用路由
this.$router.push({name: 'list', params: {list: list}})卻能夠route
routes: [
{
name: 'list',
path: '/list',
component: list
}
]co
不知道爲何push