uni-app 跳转页面传递多个参数
作者:互联网
uniapp页面跳转传递多个参数
1.字符串拼接
record(){
uni.navigateTo({
url: '/pages/record/detail?id=' + this.list.holderId + '&code=' + this.list.code + '&name=' + this.list.name
});
},
2.传递对象,需先转成字符串,接收时候再转成对象
向子页面传递
uni.navigateTo({
url: '/pages/index/index?myData=' + encodeURIComponent(JSON.stringify(row))
})
子页面接收
onLoad(option) {
const myData = JSON.parse(decodeURIComponent(option.myData))
console.log(myData)
}
标签:myData,app,list,传递,跳转,uni,页面 来源: https://www.cnblogs.com/hang30/p/16174147.html