feat: refresh

This commit is contained in:
skytek_xinliang
2026-09-14 14:05:27 +08:00
parent 87aa5c9e33
commit 2ccb073f16
3 changed files with 33 additions and 9 deletions
@@ -2,9 +2,21 @@
<v-card class="rounded-xl elevation-2 mt-4" color="surface">
<v-card-title class="d-flex align-center justify-space-between">
<span>11 項體適能測驗</span>
<v-chip color="primary" size="small" variant="tonal">
{{ completedCount }}/{{ displayItems.length }} 項有資料
</v-chip>
<div class="d-flex align-center ga-2">
<v-btn
aria-label="重新取得體適能資料"
color="primary"
:disabled="loading"
icon="mdi-refresh"
:loading="loading"
size="small"
variant="text"
@click="$emit('refresh')"
/>
<v-chip color="primary" size="small" variant="tonal">
{{ completedCount }}/{{ displayItems.length }} 項有資料
</v-chip>
</div>
</v-card-title>
<v-card-subtitle> 顯示目前帳號各測驗項目的最新成績。 </v-card-subtitle>
@@ -31,7 +43,7 @@
color="error"
size="small"
variant="text"
@click="$emit('retry')"
@click="$emit('refresh')"
>
重試
</v-btn>
@@ -52,7 +64,6 @@
<div class="text-body-2 font-weight-bold">
{{ item.fitnessName }}
</div>
<div class="text-caption text-grey">{{ item.fitnessCode }}</div>
</div>
<div
class="text-body-1 font-weight-black text-no-wrap"
@@ -78,7 +89,7 @@ const props = defineProps<{
}>();
defineEmits<{
retry: [];
refresh: [];
}>();
const FITNESS_TEST_DEFINITIONS = [