<router-link :to="{path: '/page', query: { id:id,mark:2 }}" class="main_container">
</router-link>
用router-link标签 page为要去的页面,query里面添加需要传递的参数
在page页面接收
created: function () {
const id = this.$route.query.id;
const mark = this.$route.query.mark;
}
注:此传参方法会将参数显示在地址栏,如有不便显示的参数不要使用。