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()
})
},
- 发布:2021-11-03 17:44
- 更新:2021-11-03 17:44
- 阅读:685
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: w10专业版
HBuilderX类型: 正式
HBuilderX版本号: 3.2.9
手机系统: Android
手机系统版本号: Android 11
手机厂商: 华为
手机机型: 一加7
页面类型: vue
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
1
1
预期结果:
1
1
实际结果:
1
1
bug描述:
在浏览器中正常 ,在APP中显示错误
0 个回复