Merge branch 'feat-training' into test
This commit is contained in:
@@ -77,6 +77,10 @@ const props = defineProps({
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
scoreSlot: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
isVip: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -183,8 +187,12 @@ const progressPercent = computed(() => {
|
||||
return Math.max(0, Math.min(100, (remain.value / props.total) * 100));
|
||||
});
|
||||
|
||||
const stabilityEnergyCostText = computed(() => {
|
||||
const value = Math.max(0, Number(props.energyCostPerSec) || 0);
|
||||
const stabilityEnergyCostPercentText = computed(() => {
|
||||
const scoreSlot = Number(props.scoreSlot);
|
||||
// 以满能量值为基数,换算每秒损失的能量百分比。
|
||||
const value = scoreSlot > 0
|
||||
? (Math.max(0, Number(props.energyCostPerSec) || 0) / scoreSlot) * 100
|
||||
: 0;
|
||||
return Number.isInteger(value) ? String(value) : String(Number(value.toFixed(2)));
|
||||
});
|
||||
|
||||
@@ -558,7 +566,7 @@ onBeforeUnmount(() => {
|
||||
>
|
||||
<template v-if="isStabilityTraining">
|
||||
<text class="stability-progress__cost">
|
||||
每秒失去{{ stabilityEnergyCostText }}点能量
|
||||
每秒失去{{ stabilityEnergyCostPercentText }}%能量
|
||||
</text>
|
||||
<view v-if="countdownEnabled" class="stability-progress__countdown">
|
||||
<view
|
||||
|
||||
@@ -1855,6 +1855,7 @@ onBeforeUnmount(() => {
|
||||
:serverTimestamp="rhythmCountdownTimestamp"
|
||||
:hitReq="rhythmHitReq"
|
||||
:energyCostPerSec="stabilityEnergyCostPerSec"
|
||||
:scoreSlot="stabilityScoreSlot"
|
||||
:isVip="isVip"
|
||||
:isSvip="isSvip"
|
||||
:externalShootResultAudio="
|
||||
|
||||
Reference in New Issue
Block a user