Explorar o código

修复滚动的bug

onecold hai 1 ano
pai
achega
6f823d48b8
Modificáronse 1 ficheiros con 6 adicións e 3 borrados
  1. 6 3
      entry/src/main/ets/view/LocalMusic.ets

+ 6 - 3
entry/src/main/ets/view/LocalMusic.ets

@@ -511,6 +511,7 @@ export struct LocalMusic {
         this.bottomBarHeight = 55 + 0;
         this.topBarHeight = 50 + 0;
         this.barOpacity = 1;
+        this.barBottomOpacity = 1;
         this.currentYOffset = 0;
         this.isHiding = false;
       });
@@ -2877,7 +2878,7 @@ export struct LocalMusic {
     .width('100%')
     .height('100%')
     .editMode(true)
-    .margin({ bottom: this.isCoverOpacity() ? 50 : 165 })
+    .margin({ bottom: this.isCoverOpacity() ? 80 : 175 })
     .layoutWeight(1)
     .scrollBar(BarState.Off)
     .supportAnimation(true)
@@ -3185,7 +3186,9 @@ export struct LocalMusic {
           .animation({ curve: Curve.Sharp, duration: 300 })
 
         }
-        .swipeAction((((this.modeType==3||this.modeType==2)&&this.isCanBack) && item.type !== CommonConstants.TYPE_IS_CSJAD &&
+        .swipeAction((
+          (this.modeType==0||this.modeType==1 ||((this.modeType==3||this.modeType==2)&&this.isCanBack))
+          && item.type !== CommonConstants.TYPE_IS_CSJAD &&
           !this.isHistory) ? { end: this.DeleteButton(item, index, item.filePath) } : {}) //左滑
         .onClick(() => {
 
@@ -3282,7 +3285,7 @@ export struct LocalMusic {
       }, (item: VideoItem) => item.filePath)
     }
     // .divider({ strokeWidth: 1, color: this.isDarkMode? '#333333':'#ffe9f0f0' })
-    .margin({ bottom: this.isCoverOpacity() ? 50 : 158 })
+    .margin({ bottom: this.isCoverOpacity() ? 80 : 166 })
     .cachedCount(30)
     .borderRadius(20)
     .layoutWeight(1)