HarmonyOS 页面跳转传递的参数,在回调中访问报错:Error message:is not callable

1、page1跳转page2,传递参数note

2、page2中,组件回调函数中调用note的方法会报错

HarmonyOS
2025-01-09 15:40:22
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
Heiang

页面路由不支持传递方法,需要在第二页重新构建一个方法。页面路由的使用可参考以下链接:

@ohos.router:

https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-routing-V5

router.pushUrl:

https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-router-V5#routerpushurl9

分享
微博
QQ
微信
回复
2025-01-09 17:43:38
相关问题
冷启动报错Error message
2404浏览 • 1回复 待解决
app启动crash报错Error message:MainPage:
2174浏览 • 1回复 待解决
HarmonyOS web组件参数传递报错
359浏览 • 1回复 待解决
Web组件访问本地资源并传递参数
1023浏览 • 1回复 待解决