Răsfoiți Sursa

fix: 修复数据统计页下拉刷新无法回弹的问题

- 将 invalidateQueries 改为 refetchQueries
- refetchQueries 会等待所有查询完成后才返回
- 确保下拉刷新动画在数据加载完成后才停止

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname 3 zile în urmă
părinte
comite
20edae965f

+ 2 - 2
mini-ui-packages/yongren-statistics-ui/src/pages/Statistics/Statistics.tsx

@@ -119,8 +119,8 @@ const Statistics: React.FC<StatisticsProps> = () => {
   // 下拉刷新:刷新所有统计数据
   usePullDownRefresh(async () => {
     try {
-      // 使所有统计查询失效,触发重新获取
-      await queryClient.invalidateQueries({ queryKey: ['statistics'] })
+      // refetchQueries 会等待所有查询完成后才返回
+      await queryClient.refetchQueries({ queryKey: ['statistics'] })
     } finally {
       Taro.stopPullDownRefresh()
     }