diff --git a/src/components/ScoreResult.vue b/src/components/ScoreResult.vue index 1042576..56c7a41 100644 --- a/src/components/ScoreResult.vue +++ b/src/components/ScoreResult.vue @@ -56,16 +56,20 @@ onMounted(() => { ); }); -const validArrows = computed(() => { - return (props.result.details || []).filter( - (arrow) => arrow.x !== -30 && arrow.y !== -30 - ).length; -}); - const getRing = (arrow) => { if (arrow.ringX) return "X"; - return arrow.ring ? arrow.ring + "环" : "-"; + return arrow.ring ? arrow.ring : "-"; }; + +const arrows = computed(() => { + const data = new Array(props.total).fill({}); + (props.result.details || []).forEach((arrow, index) => { + data[index] = arrow; + }); + return data; +}); + +const validArrows = computed(() => arrows.value.filter((a) => !!a.ring));