fix: chat 视图 scroll-view 添加 height: 100% + min-height: 0
参考项目内已工作的 .result-view 模式: - flex: 1 仅在 flex 布局父容器中生效 - 但 UniApp <scroll-view> 是原生组件,必须显式 height: 100% - 同时 min-height: 0 确保 flex 子项可收缩 之前只设 flex: 1,真机上原生 scroll-view 无法计算可滚动区域。
This commit is contained in:
@@ -3542,9 +3542,13 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.chat-scroll {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
flex: 1;
|
||||
/* 删除固定 height,让 flex: 1 自适应剩余空间 */
|
||||
/* 真机上设备高度、状态栏、tab 栏各不相同,硬编码 220rpx 会导致滚动失效 */
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
/* 参考 .result-view:UniApp <scroll-view> 必须显式 height: 100% + min-height: 0 才能正确滚动 */
|
||||
/* 仅 flex: 1 在真机上无法让原生 scroll-view 组件计算可滚动区域 */
|
||||
}
|
||||
|
||||
.chat-scroll-content {
|
||||
|
||||
Reference in New Issue
Block a user