feat: records 页面接入骨架屏 + loading 状态
This commit is contained in:
@@ -7,6 +7,7 @@ Page({
|
||||
data: {
|
||||
theme: { primary: '#FF6B35', primaryLight: '#FF8C5A', primaryBg: '#FFF3ED', primaryRgb: '255,107,53' },
|
||||
themeStyle: themeMod.BASE_VARS,
|
||||
loading: true,
|
||||
totalDuration: 0,
|
||||
totalDurationText: '',
|
||||
totalSessions: 0,
|
||||
@@ -74,7 +75,8 @@ Page({
|
||||
maxDuration: stats.maxDuration,
|
||||
maxDurationText: util.formatDuration(stats.maxDuration),
|
||||
monthRecords: records,
|
||||
historyList
|
||||
historyList,
|
||||
loading: false
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
<view class="container page-enter" style="{{themeStyle}}">
|
||||
<!-- 加载骨架屏 (200ms 最小显示) -->
|
||||
<block wx:if="{{loading}}">
|
||||
<ui-skeleton variant="card" />
|
||||
<view style="height: 24rpx;" />
|
||||
<ui-skeleton variant="card" />
|
||||
</block>
|
||||
|
||||
<!-- 真实内容 (loading 时隐藏) -->
|
||||
<view hidden="{{loading}}">
|
||||
<!-- 统计卡片 -->
|
||||
<ui-card variant="in">
|
||||
<view class="stats">
|
||||
@@ -81,6 +90,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</ui-card>
|
||||
</view>
|
||||
<!-- /hidden wrapper -->
|
||||
|
||||
<!-- 日期详情弹窗 -->
|
||||
<ui-modal visible="{{showDayDetail}}" position="center" bind:close="onCloseDayDetail">
|
||||
|
||||
Reference in New Issue
Block a user