Sfoglia il codice sorgente

切换分类 歌单 网盘的 list动画效果

onecold 9 mesi fa
parent
commit
643dfcbf01
2 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. 1 1
      AppScope/app.json5
  2. 6 2
      entry/src/main/ets/pages/NewIndex.ets

+ 1 - 1
AppScope/app.json5

@@ -8,7 +8,7 @@
     "label": "$string:app_name",
     "multiAppMode": {
       "multiAppModeType": "appClone",
-      "maxCount": 3
+      "maxCount": 5
     }
   }
 }

+ 6 - 2
entry/src/main/ets/pages/NewIndex.ets

@@ -1118,7 +1118,7 @@ struct NewIndex {
     }
     
     // 歌单列表
-    ForEach(this.playlistList, (playlist: Playlist) => {
+    ForEach(this.playlistList, (playlist: Playlist,index:number) => {
       ListItem() {
         Button({ type: ButtonType.Capsule, stateEffect: true }) {
           Row() {
@@ -1184,6 +1184,8 @@ struct NewIndex {
             previewAnimationOptions: { scale: [0.8, 1.0] },
           })
       }
+      .transition(TransitionEffect.move(TransitionEdge.BOTTOM)
+        .animation({ duration: 600, curve: Curve.Ease, delay: 60 * index }))
     })
   }
 
@@ -1231,7 +1233,7 @@ struct NewIndex {
       })
     }
     // 显示所有WebDAV账户
-    ForEach(this.webDavAccounts, (account: WebDavAccount) => {
+    ForEach(this.webDavAccounts, (account: WebDavAccount,index:number) => {
       ListItem() {
         Button({ type: ButtonType.Capsule, stateEffect: true }) {
           Row() {
@@ -1305,6 +1307,8 @@ struct NewIndex {
             previewAnimationOptions: { scale: [0.8, 1.0] },
           })
       }
+      .transition(TransitionEffect.move(TransitionEdge.BOTTOM)
+        .animation({ duration: 600, curve: Curve.Ease, delay: 60 * index }))
     })