简介
跳转传参以及接收参数
list.vue文件(传)
1.单个参数
toDetails(item,index) {
this.$common.to(`pages/index/details?id=${
item.id}`)
},
或者
toDetails(item,index) {
this.$common.to('/pages/index/details?id=' + item.id);
},
2.多个参数
toDetails(item,index) {
this.$common.to(`pages/index/details?id=${
item.id}&type=${
item.type}`)
},
或者
toDetails(item,index) {
this.$common.to('/pages/index/details?id=' + item.id + '&type=' + item.type);
},
detalis.vue文件(接收)
onload(options){
console.log(options)
}