小小白啊
小小白啊
  • 发布:2022-09-15 10:00
  • 更新:2024-01-04 13:19
  • 阅读:600

【报Bug】Vue3中在iOS13平台下不执行原来Vue2的mounted

分类:uni-app

产品分类: 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.

bug描述:

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的环境,没有这个错误,安卓也是。

2022-09-15 10:00 负责人:无 分享
已邀请:
DCloud_UNI_WZF

DCloud_UNI_WZF

测试未复现该问题,请检查代码或提供可复现demo

Anet

Anet

我遇到的是ios系统14.4,报这个错误,系统15.5的正常
vue3+vite+ts

dafeizhu

dafeizhu

解决了吗?我在秋云echart插件中也遇到了,iOS端vue3+vite,不执行mounted钩子导致插件内inApp判断错误,图表渲染不出来

我愿你知道

我愿你知道

请问解决了吗?我这边也出现了同样的错误

要回复问题请先登录注册