diff --git a/components/mescroll/my-list-mescroll.vue b/components/mescroll/my-list-mescroll.vue
index c1f71be..7f241a4 100644
--- a/components/mescroll/my-list-mescroll.vue
+++ b/components/mescroll/my-list-mescroll.vue
@@ -15,7 +15,9 @@
@init="mescrollInit"
>
-
+
+
+
@@ -45,6 +47,7 @@ export default {
onScroll: true
},
scrollY: 0,
+ renderSlotKey: 0,
isInit: false
};
},
@@ -72,17 +75,8 @@ export default {
this.isInit = true;
},
mounted() {
- // #ifdef MP-HARMONY
- // 鸿蒙 ArkUI DOM 初始化较慢,延迟加载确保渲染管线就绪
- setTimeout(() => {
- this.mescroll.resetUpScroll();
- this.listenRefresh();
- }, 400);
- // #endif
- // #ifndef MP-HARMONY
this.mescroll.resetUpScroll();
this.listenRefresh();
- // #endif
},
methods: {
// mescroll组件初始化的回调,可获取到mescroll对象
@@ -101,6 +95,12 @@ export default {
upCallback() {
//联网加载数据
this.$emit('getData', this.mescroll);
+ // #ifdef MP-HARMONY
+ // 鸿蒙 ArkUI 对 slot 内容响应式更新不敏感,数据加载后通过改变 key 强制重建
+ setTimeout(() => {
+ this.renderSlotKey++;
+ }, 300);
+ // #endif
},
//点击空布局按钮的回调
emptyClick() {