可以使用loadContent(path: string, storage: LocalStorage)方法加载新页面并通过lcoalStorage传递参数,在新页面中通过LocalStorage.getShared()获取传入的lcoalStorage。参考文档如下:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-window-V5\#loadcontent9https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-localstorage-V5
可以使用loadContent(path: string, storage: LocalStorage)方法加载新页面并通过lcoalStorage传递参数,在新页面中通过LocalStorage.getShared()获取传入的lcoalStorage。
参考文档如下:
https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-window-V5\#loadcontent9
https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-localstorage-V5