uniapp页面跳转传参
1. uni.navigateTo
传:
<view @click="showDetail({id: 1})"></view>
showDetail(data) {
uni.navigateTo({
url:
"/pages/sys/workbench/productCenterFirm/productCenterFirmDetail?id=" +
data.id,
});
},
接:
onl oad(option) {
this.id = option.id;
},
2. navigator
传:
<navigator :url="`productList?id=${item.id}`" open-type="navigate">详情</navigator> // 跳转到同级文件夹下面的productList页面,并且携带参数 id
接:
onl oad(option) {
this.id = option.id;
},
标签:传参,uniapp,option,跳转,id,页面
From: https://www.cnblogs.com/ProgrammerMao-001/p/18342775