VUE跳转页面传值 地址栏显示传值或者不显示地址栏传值
a页面传值到b页面
params 传参 : 相当于post请求,页面跳转时参数不会在地址栏中显示
this.$router.push({
path: 'xxx',
name:'xxx',
params: { id:idParams }
})
接收参数:this.$route.params.id
query 传参 : 相当于get请求,页面跳转时参数会在地址栏中显示
this.$router.push({
path: 'xxx',
name:'xxx',
query: { id:idParams }
})
接收参数:this.$route.query.id
1085

被折叠的 条评论
为什么被折叠?



