fix(harmony): 数据加载后调用 scrollTo 强制 mescroll 重新计算内容高度

- 根因:mescroll 初始化时 setClientHeight 在 slot 内容渲染前执行,测得高度为 0
- 数据加载后 mescroll 不知道内容高度已变化,scroll-view 仍保持 0 高度
- 点击排序后触发 refresh() → setClientHeight() 重新测量,内容才显示
- 修复:数据加载后调用 scrollTo(0, 0) 强制 mescroll 重新测量内容高度
- mescroll-uni.vue 同步暴露 scrollTo 方法供外部调用
This commit is contained in:
2026-06-05 11:47:22 +08:00
parent a23d57547b
commit 2ec9aa990f
2 changed files with 15 additions and 0 deletions

View File

@@ -217,6 +217,9 @@
}
},
methods: {
scrollTo(y, t) {
this.mescroll.scrollTo(y, t);
},
//number,rpx,upx,px,% --> px的数值
toPx(num) {
if (typeof num === 'string') {