在父组件里传送
this.$router.push({
path: '/postView',//子组件路径
query: { id: row.id, bbsTopicId: row.bbsTopicId } //需要传的参数
})
在子组件里接收
this.$route.query.id //获取到id
this.$route.query.bbsTopicId //获取到bbsTopicId
注:可以通过console.log(this.$route.query)查看具体有那些值传过来