vue页面传参数
1.params方法
a页面
this.$router.push({path:`/addressEdit/${item.id}`})
b页面接收:
created(){
console.log(this.$route.params.id)
}
2. query方法
a页面
this.$router.push({
path: path: `/addressEdit/${item.id}`,
query: {
searchVal: "1" ,
},
});
b页面接收:
created(){
this.$route.query.searchVal
}

浙公网安备 33010602011771号