update:优化训练0环显示

This commit is contained in:
2026-07-31 13:52:39 +08:00
parent 07dc8a250c
commit cfdb169329
2 changed files with 17 additions and 8 deletions
+6 -3
View File
@@ -57,19 +57,22 @@ onMounted(() => {
});
const getRing = (arrow) => {
if (!arrow) return "-";
if (arrow.ringX) return "X";
return arrow.ring ? arrow.ring : "-";
return Number(arrow.ring) || 0;
};
const arrows = computed(() => {
const data = new Array(props.total).fill({ ring: 0 });
const data = new Array(props.total).fill(null);
(props.result.details || []).forEach((arrow, index) => {
data[index] = arrow;
});
return data;
});
const validArrows = computed(() => arrows.value.filter((a) => !!a.ring).length);
const validArrows = computed(
() => arrows.value.filter((a) => Number(a?.ring) > 0).length
);
const isMember = computed(() => user.value.vip === true || user.value.sVip === true);
const openCoachComment = () => {
if (!isMember.value) return;