组件.vue
mounted() {
Promise.all([getRequest1(), getRequest2()]).then((res) => {
})
}
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: Windiws10 ltsc
HBuilderX类型: 正式
HBuilderX版本号: 3.5.3
手机系统: iOS
手机系统版本号: iOS 13.4
手机厂商: 苹果
手机机型: iPhone11
页面类型: vue
vue版本: vue2
打包方式: 云端
项目创建方式: HBuilderX
组件.vue
mounted() {
Promise.all([getRequest1(), getRequest2()]).then((res) => {
})
}
ios 13版本,必须是组件
能正常执行mounted
uni-app onMounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.
uni-app onMounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.
首先其他高版本iOS的环境,没有这个错误,安卓也是。
4 个回复
DCloud_UNI_WZF
测试未复现该问题,请检查代码或提供可复现demo
Anet
我遇到的是ios系统14.4,报这个错误,系统15.5的正常
vue3+vite+ts
g***@zhongjingzh.com
解决没有
2023-07-24 15:52
Anet
回复 g***@zhongjingzh.com: 没有
2023-07-31 10:43
dafeizhu
解决了吗?我在秋云echart插件中也遇到了,iOS端vue3+vite,不执行mounted钩子导致插件内inApp判断错误,图表渲染不出来
我愿你知道
请问解决了吗?我这边也出现了同样的错误