feat(leaderboard): 下拉刷新动画图标

下拉刷新时顶部显示主题色旋转 spinner + "刷新中…"指示器,
仅下拉刷新显示(pullRefreshing),后台静默刷新保持无感。

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-28 09:20:43 +08:00
parent b42d080826
commit faa49cff1c
3 changed files with 45 additions and 1 deletions
+6 -1
View File
@@ -18,6 +18,7 @@ Page({
myEntry: null,
loading: false,
refreshing: false,
pullRefreshing: false,
empty: false,
icons: iconsMod.build()
},
@@ -48,7 +49,11 @@ Page({
},
onPullDownRefresh() {
this.fetchRank(() => wx.stopPullDownRefresh(), true)
this.setData({ pullRefreshing: true })
this.fetchRank(() => {
this.setData({ pullRefreshing: false })
wx.stopPullDownRefresh()
}, true)
},
switchPeriod(e) {