Browse Source

修复yOffset报错

onecold 8 tháng trước cách đây
mục cha
commit
95086a868f
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      entry/src/main/ets/view/LocalMusic.ets

+ 2 - 2
entry/src/main/ets/view/LocalMusic.ets

@@ -5403,7 +5403,7 @@ export struct LocalMusic {
         .onScrollFrameBegin((offset: number) => {
           // 获取当前滚动偏移量
           if(this.autoHideTitle){
-            const currentOffsetY = this.scroller.currentOffset().yOffset;
+            const currentOffsetY = this.waterScroller.currentOffset().yOffset;
             // 判断滚动方向
             if (currentOffsetY > this.prevOffsetY) {
               console.log("onecold 向上滚动");
@@ -6643,7 +6643,7 @@ export struct LocalMusic {
     .onScrollFrameBegin((offset: number) => {
       // 获取当前滚动偏移量
       if(this.autoHideTitle){
-        const currentOffsetY = this.scroller.currentOffset().yOffset;
+        const currentOffsetY = this.listScroller.currentOffset().yOffset;
         // 判断滚动方向
         if (currentOffsetY > this.prevOffsetY) {
           console.log("onecold 向上滚动");