update:优化节奏训练结算

This commit is contained in:
2026-08-25 18:00:14 +08:00
parent 2eba5f87d7
commit 45bc324f70
3 changed files with 13 additions and 2 deletions
@@ -28,6 +28,10 @@ const props = defineProps({
type: Number, type: Number,
default: 0, default: 0,
}, },
trainingType: {
type: String,
default: "",
},
}); });
</script> </script>
@@ -72,6 +76,7 @@ const props = defineProps({
:rowCount="total === 12 ? 6 : 9" :rowCount="total === 12 ? 6 : 9"
:total="total" :total="total"
:arrows="arrows" :arrows="arrows"
:trainingType="trainingType"
:margin="total === 12 ? 4 : 1" :margin="total === 12 ? 4 : 1"
:fontSize="total === 12 ? 25 : 22" :fontSize="total === 12 ? 25 : 22"
/> />
+7 -1
View File
@@ -21,6 +21,10 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: true, default: true,
}, },
trainingType: {
type: String,
default: "",
},
}); });
const items = ref(new Array(props.total).fill(9)); const items = ref(new Array(props.total).fill(9));
const bgImages = [ const bgImages = [
@@ -34,7 +38,9 @@ const getDisplayText = (arrow) => {
}; };
const isLowScore = (arrow) => { const isLowScore = (arrow) => {
if (!arrow || arrow.ringX) return false; if (!arrow) return false;
if (props.trainingType === "rhythm") return arrow.ok !== true;
if (arrow.ringX) return false;
const ring = Number(arrow.ring); const ring = Number(arrow.ring);
return Number.isFinite(ring) && ring < 6; return Number.isFinite(ring) && ring < 6;
}; };
@@ -454,7 +454,7 @@ const calories = computed(
</view> </view>
</view> </view>
</ScreenHint> </ScreenHint>
<BowData :total="details.length" :arrows="details" :show="showBowData" <BowData :total="details.length" :arrows="details" :show="showBowData" :trainingType="resultTrainingType"
:onClose="() => (showBowData = false)" /> :onClose="() => (showBowData = false)" />
<UserUpgrade :show="showUpgrade" :onClose="() => (showUpgrade = false)" :lvl="userLevel" /> <UserUpgrade :show="showUpgrade" :onClose="() => (showUpgrade = false)" :lvl="userLevel" />
</view> </view>