侠客请接刀s
侠客请接刀s
  • 发布:2021-11-03 17:44
  • 更新:2021-11-03 17:44
  • 阅读:509

【报Bug】boundingClientRect操作节点在APP端异常 获取bottom top height 都存在问题

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: w10专业版

HBuilderX类型: 正式

HBuilderX版本号: 3.2.9

手机系统: Android

手机系统版本号: Android 11

手机厂商: 华为

手机机型: 一加7

页面类型: vue

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
    createSelectorQuery() {  
                this.query = uni.createSelectorQuery()  
            },  
            updateWaterfall() {  
                let that = this  
                let item = that.videoList.shift()  
                if (item == null) {  
                    return  
                }  
                that.query.select('#left_waterfall').boundingClientRect(data1 => {  
                    that.leftHeight = data1.bottom  
                }).exec();   
                that.query.select('#right_waterfall').boundingClientRect(data2 => {  
                    that.rightHeight = data2.bottom  
                    // let leftHeight = this.$refs.left_waterfall.clientHeight  
                    // let rightHeight = this.$refs.right_waterfall.clientHeight  
                    // console.log('dd',this.$refs.left_waterfall);  
                }).exec();  
                if (that.leftHeight <= that.rightHeight) {  
                    console.log('left',that.leftHeight,that.rightHeight);  
                    that.leftItems_videoList.push(item)  
                    that.leftHeight = 0  
                } else {  
                    that.rightItems_videoList.push(item)  
                    console.log('right',that.leftHeight,that.rightHeight);  
                    that.rightHeight = 0  
                }  
                that.$nextTick(function() {  
                    that.updateWaterfall()  
                })  
            },

操作步骤:

1

预期结果:

1

实际结果:

1

bug描述:

在浏览器中正常 ,在APP中显示错误

2021-11-03 17:44 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复