Răsfoiți Sursa

优化长按的菜单

onecold 9 luni în urmă
părinte
comite
fc89313f05
1 a modificat fișierele cu 5 adăugiri și 13 ștergeri
  1. 5 13
      entry/src/main/ets/view/LocalMusic.ets

+ 5 - 13
entry/src/main/ets/view/LocalMusic.ets

@@ -3787,6 +3787,7 @@ export struct LocalMusic {
     .backgroundColor(Color.Transparent)
     .height(this.twoFingerType == 3 ? ITEM_HEIGHT_BIG : this.twoFingerType == 2 ? ITEM_HEIGHT : ITEM_HEIGHT_SMALL)
     .width('100%')
+    .reuseId('dir_item')
     .visibility(this.isShowDir(item.name) ? Visibility.Visible : Visibility.None)
     .opacity(this.opacityItem) // 绑定透明度
 
@@ -4009,6 +4010,7 @@ export struct LocalMusic {
     }
     .backgroundColor(Color.Transparent)
     .width('100%')
+    .reuseId('file_item')
     .height(this.twoFingerType == 3 ? ITEM_HEIGHT_BIG : this.twoFingerType == 2 ? ITEM_HEIGHT : ITEM_HEIGHT_SMALL)
   }
 
@@ -5555,22 +5557,12 @@ export struct LocalMusic {
       .onActionStart(e => {
 
       }))
-    // .margin(
-    //   this.isHiCar()&&(this.windowWidth>1800&&this.windowHeight>=1200)?{bottom:this.bottomBarHeight+98}:
-    //   {
-    //   bottom: this.isCoverOpacity() ? (this.isShowCoverHeader() ? this.topBarHeight+25 : this.topBarHeight+80)
-    //     : (this.isShowCoverHeader() ? this.topBarHeight+35 :
-    //       this.isHiCarSmall()||this.modeType==4?this.topBarHeight+90:this.topBarHeight+165)
-    // })
-    // .margin({
-    //       bottom:this.isShowCoverHeader() ? this.bottomBarHeight+30
-    //         :  this.bottomBarHeight+this.topSafeHeight+this.topBarHeight+this.offHeight
-    //     })
+
     .contentStartOffset(this.topSafeHeight + 55)
     .scrollBar(BarState.Off)
     .contentEndOffset(this.bottomBarHeight+this.bottomSafeHeight)
-    .cachedCount(5)
-    .reuseId('list_item')
+    .cachedCount(10)
+    // .reuseId('list_item')
     .borderRadius(20)
     // .transition(TransitionEffect.asymmetric(TransitionEffect.scale({ x: 0.9, y: 0.9 }).animation({ duration: 400 }),
     //   TransitionEffect.scale({ x: 0, y: 0 })))