今天在用路由传递参数时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