VUE跳转页面传值 地址栏显示传值或者不显示地址栏传值
a页面传值到b页面
params 传参 : 相当于post请求,页面跳转时参数不会在地址栏中显示

this.$router.push({

name:'',

params: { id:idParams }

})

接收参数:this.$route.params.id

query 传参 : 相当于get请求,页面跳转时参数会在地址栏中显示

this.$router.push({

name:'',

query: { id:idParams }

})

接收参数:this.$route.query.id

注意:传参是 router , 接收参数是 route

 

转自:https://blog.csdn.net/weixin_43836052/article/details/95166345

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2021-06-15
  • 2022-12-23
相关资源
相似解决方案