uni-app VUE3运行到鸿蒙app uni.setStorageSync无法保存this引用的对象
uni-app VUE3运行到鸿蒙app uni.setStorageSync无法保存this引用的对象
| 开发环境 | 版本号 | 项目创建方式 |
|---|---|---|
| Windows | win11 | HBuilderX |
# 操作步骤:
现在就是保存页面中this引用的数据必须执行JSON.parse(JSON.stringify(this.xxx))
# 预期结果:
现在就是保存页面中this引用的数据必须执行JSON.parse(JSON.stringify(this.xxx))
# 实际结果:
现在就是保存页面中this引用的数据必须执行JSON.parse(JSON.stringify(this.xxx))
## bug描述:
1.uni.setStorageSync('tabSet',JSON.parse(JSON.stringify(this.tabSet)) )
2.uni.setStorageSync('tabSet',this.tabSet)
console.log(uni.getStorageSync('tabSet'))
当用1的方式保存到缓存中 可以正常打印这个对象
当用2的方式保存到缓存 则打出来是个空?
现在就是保存页面中this引用的数据必须执行JSON.parse(JSON.stringify(this.xxx))
帮忙看看是不是bug
H5 安卓 IOS 小程序均正常
更多关于uni-app VUE3运行到鸿蒙app uni.setStorageSync无法保存this引用的对象的实战教程也可以访问 https://www.itying.com/category-93-b0.html
4 回复
4.73 alpha 修复
更多关于uni-app VUE3运行到鸿蒙app uni.setStorageSync无法保存this引用的对象的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
已知问题,是华为的jsvm存在兼容问题,之后会修复
这个不是经常用到吗,改的地方太多。近期可以修复吗?
回复 2***@qq.com: 4.73 alpha (下个版本)就会修复,等发版后您可以再试一下

