1.通过query实现:
<router-link :to="{ name:'home',query:{id:1} }">跳转页面</router-link>
获取:
this.$route.query
2.通过params配置:
<router-link :to="{ name:'home',params:{'name':'Tom'} }">跳转页面</router-link>
获取:
this.$route.params
来源:https://www.cnblogs.com/hspl/p/12022445.html