params 传参
patams传参 ,路径不能使用path 只能使用name,不然获取不到传的数据
this.$router.push({ name: 'Home',params: textCity: _city}})

取参
this.$route.params.textCity

2 query传参
this.$router.push({path: '/transport/dispatch', query: {paicheNo: obj.paicheNo}})
取数据:this.$route.query.paicheNo
this.$route.query.paicheNo
网友评论