update:优化训练0环显示
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user