个人理解,仅供参考
查询参数传参
可传递多个参数
?参数=参数值 ==> this.$route.query.参数
传参页面
@click="$router.push(`/goods(路由名)?id=${ (值) }`)"
接收传参页面
console.log(this.$route.query.id)
动态路由传参
需要改造路由
路由配置界面
path: '/goods(路由名)/:id',
传参界面
this.$router.push(`/goods/${id}`)
接收界面
console.log(this.$route.params.id)