uniapp vue3 路由传参 利用props获取参数
A页面跳转B页面
A页面
function toDetail(value) {
console.log('click');
let chuansVal = encodeURIComponent(JSON.stringify(value));
console.log(chuansVal);
uni.navigateTo({
url: "/pages/material/receiveDetail?data=" + chuansVal
});
}
B页面
const props = defineProps({
data: String
});
const data = JSON.parse(decodeURIComponent(props.data)
console.log("data", data);
本文来自博客园,作者:格林格林,转载请注明原文链接:https://www.cnblogs.com/beiyi-Lin/p/18701284

浙公网安备 33010602011771号