数据显示修改

This commit is contained in:
kron
2025-08-27 18:41:42 +08:00
parent 01f05f4824
commit f076065550
2 changed files with 8 additions and 4 deletions

View File

@@ -11,11 +11,13 @@ import { storeToRefs } from "pinia";
const store = useStore();
const { user } = storeToRefs(store);
const arrows = ref([]);
const total = ref(0);
onLoad(async (options) => {
if (options.id) {
const result = await getPractiseAPI(options.id);
arrows.value = result.arrows;
total.value = result.completed_arrows;
}
});
</script>
@@ -43,8 +45,8 @@ onLoad(async (options) => {
</view>
<ScorePanel
:completeEffect="false"
:rowCount="arrows.length === 12 ? 6 : 9"
:total="arrows.length"
:rowCount="total === 12 ? 6 : 9"
:total="total"
:scores="arrows.map((a) => a.ring)"
:margin="arrows.length === 12 ? 4 : 1"
:fontSize="arrows.length === 12 ? 25 : 22"