![](https://i-blog.csdnimg.cn/blog_migrate/0e013dea0fb6d4b246b73f9ab1f4320c.png)
//先写点击事件
xq(a){ //a是要传的参数
this.$router.push({
path: '/a4',
query: {
a: a,
}// 要传递的参数
})
// console.log(a);
}
![](https://i-blog.csdnimg.cn/blog_migrate/5f63c05d382966d300e87c5081a295d9.png)
data() {
return {
obj:'' //自定义obj
}
},
arr(){ //接收的参数
this.obj = this.$route.query.a
console.log(this.obj);
}
},
created() {
this.arr()
},
}
接下来渲染出来的时候就不能v-for了,要用你定义的obj来接收你传过来的参数
![](https://i-blog.csdnimg.cn/blog_migrate/c284c5a3fe55452f58d4599aee260b80.png)