标签方式跳转

 <router-link :to="{path:'/',query: {id: 'testQuery'}}">返回列表测试Query</router-link>

脚本方式跳转

this.$router.push({ name: 'productIndex',params: { id: "testParams" } })
this.$router.push({ path: `product/detail/${row.id}`})
this.$router.push({ path: 'product/xxxx',query: { id: "testParams" } })

productIndex:路由名称

params:传出参

获取传入参数

console.log(this.$route.params);
console.log(this.$route.query);

 

知道、想到、做到、得到