uni-app HBuilder 3.2.9 且 iOS 15 时 list 下的 cell 滚动绘制异常 list-swiper-waterfall 滚动时 waterfall 白屏
uni-app HBuilder 3.2.9 且 iOS 15 时 list 下的 cell 滚动绘制异常 list-swiper-waterfall 滚动时 waterfall 白屏
产品分类:
uniapp/App
打包方式:
云端
项目创建方式:
CLI
| 开发环境 | 版本号 | 项目创建方式 |
|---|---|---|
| Mac | macOS Big Sur 11.6 | CLI 2.0.0-32920210927001 |
示例代码:
<template>
<hbb-scroll list :id="id" :bounce="false" :fix-freezing="true">
<cell :style="{ height: headerHeight }">
<view class="status-bar" :style="{ height: statusBarHeight }" v-if="show" />
<view class="head">
<text>{{ headerHeight }}</text>
</view>
</cell>
<cell :style="{ height: pageHeight }">
<view class="tabs" @appear="show = true" @disappear="show = false"/>
<hbb-scroll ref="page" waterfall :bounce="false" :fix-freezing="true">
<header style="height:24rpx"></header>
<cell v-for="idx in 20" :key="idx">
<text class="card">{{ idx }}</text>
</cell>
</hbb-scroll>
</cell>
</hbb-scroll>
</template>
<script>
import HbbScroll from '../../components/hbb-scroll.vue'
export default {
components:{
HbbScroll
},
data() {
const sys = uni.getSystemInfoSync()
return {
id: 'main',
show: false,
pageHeight: sys.windowHeight - sys.statusBarHeight,
headerHeight: sys.screenHeight,
statusBarHeight: sys.statusBarHeight,
}
},
onReady() {
this.$refs.page.setEffects(this.id, this.headerHeight)
},
}
</script>
<style lang="scss" scoped>
.status-bar {
position: fixed;
top: 0;
right: 0;
left: 0;
background: white;
}
.head {
flex: 1;
align-items: center;
justify-content: center;
background: rgba(green, 0.1);
}
.tabs {
height: 88rpx;
background: rgba(red, 0.1);
}
.card {
width: 328rpx;
height: 328rpx;
margin-bottom: 24rpx;
line-height: 328rpx;
text-align: center;
background: white;
border-radius: 20rpx;
}
</style>
`更多关于uni-app HBuilder 3.2.9 且 iOS 15 时 list 下的 cell 滚动绘制异常 list-swiper-waterfall 滚动时 waterfall 白屏的实战教程也可以访问 https://www.itying.com/category-93-b0.html
打包机已更新相关依赖库修复此问题,使用 HX3.2.9 版本重新提交云端打包就好了
更多关于uni-app HBuilder 3.2.9 且 iOS 15 时 list 下的 cell 滚动绘制异常 list-swiper-waterfall 滚动时 waterfall 白屏的实战教程也可以访问 https://www.itying.com/category-93-b0.html
你好,请上传一个能复现问题的完整示例方便排查
官方新闻/咨询模版也有一样的问题
回复 青阳_1900: 好的,我们排查一下
补充一下官方的显示问题
waterfall 的示例是否可以提供一下?
工程放到附件里面了
我提的几个BUG,确认了的话给我加点分,每次新版或Alpha出来,我都得给你们测试一堆,写demo也费时。你看我主页,里面全是bug反馈
回复 青阳_1900: 好的,确认了必须得加分
问题复现了,今天会发布新版本已经修复
这是一个已知的iOS 15特定版本下的渲染兼容性问题,主要涉及list组件嵌套waterfall时的渲染异常。
问题原因:
- iOS 15系统在特定版本中优化了WebKit渲染机制,导致嵌套滚动容器在快速滚动时触发渲染管线异常
waterfall组件在list容器内,当外层list滚动时,内层waterfall的渲染区域计算可能出现偏差- HBuilder 3.2.9对应的基础库版本在iOS 15上存在此兼容性问题
解决方案:
-
升级HBuilderX到最新版本(推荐) 最新版本已修复此问题,建议升级到HBuilderX 3.4+版本
-
临时修复方案(如无法立即升级):
<hbb-scroll ref="page" waterfall :bounce="false" :fix-freezing="true" :style="{ '-webkit-overflow-scrolling': 'auto' }">添加
-webkit-overflow-scrolling: auto强制使用标准滚动模式 -
调整组件结构:
<!-- 避免list直接嵌套waterfall --> <view class="container"> <hbb-scroll list :id="id" :bounce="false"> <!-- 第一屏内容 --> </hbb-scroll> <hbb-scroll waterfall :bounce="false"> <!-- 瀑布流内容 --> </hbb-scroll> </view> -
添加渲染延迟(应急方案):
onReady() { setTimeout(() => { this.$refs.page.setEffects(this.id, this.headerHeight) }, 100) }

