l***@qq.com
l***@qq.com
  • 发布:2023-08-04 15:57
  • 更新:2024-02-06 18:15
  • 阅读:217

【报Bug】App端 video标签动态切换时控制台报错

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: 13.4.1

HBuilderX类型: 正式

HBuilderX版本号: 3.8.7

手机系统: Android

手机系统版本号: Android 10

手机厂商: xiwo

手机机型: 平板

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

vue页面,创建video标签,使用v-if控制video标签切换显示隐藏

预期结果:

正常切换,控制台无报错

实际结果:

正常切换,但控制台报错

bug描述:

app端,在vue页面使用video标签时,用v-if动态切换video标签,控制台会报如下错误:
15:44:43.040 Uncaught TypeError: Cannot read property 'childNodes' of null at uni-app-view.umd.js:1
15:44:43.041 Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null at uni-app-view.umd.js:1
15:44:43.042 Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null at uni-app-view.umd.js:1
15:44:43.042 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. at uni-app-view.umd.js:1
15:44:43.042 Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null at uni-app-view.umd.js:1
15:44:43.042 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. at uni-app-view.umd.js:1

目前暂时未发现影响正常运行,但是希望官方修复

2023-08-04 15:57 负责人:无 分享
已邀请:
Diligent_UI

Diligent_UI - 【插件开发】【专治疑难杂症】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=193663(微信搜索飘逸科技UI小程序直接体验)】【骗子请绕道】问题咨询请加QQ群:120594820,代表作灵感实用工具小程序

能具体描述问题吗,提供效果截图和代码截图可以高效率解决问题

j***@126.com

j***@126.com

我也遇到了,App端组件中使用的
uni.createSelectorQuery()
.in(vm)
.select(#fixed)
.boundingClientRect((data) => {
//....
})
.exec();

显示组件没问题,隐藏组件报 Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null at uni-app-view.umd.js:1,hbx3.99 win11 不影响使用,目前没有找到解决的办法

要回复问题请先登录注册