update:优化稳定训练提示
This commit is contained in:
@@ -77,6 +77,10 @@ const props = defineProps({
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
|
scoreSlot: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
isVip: {
|
isVip: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
@@ -183,8 +187,12 @@ const progressPercent = computed(() => {
|
|||||||
return Math.max(0, Math.min(100, (remain.value / props.total) * 100));
|
return Math.max(0, Math.min(100, (remain.value / props.total) * 100));
|
||||||
});
|
});
|
||||||
|
|
||||||
const stabilityEnergyCostText = computed(() => {
|
const stabilityEnergyCostPercentText = computed(() => {
|
||||||
const value = Math.max(0, Number(props.energyCostPerSec) || 0);
|
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)));
|
return Number.isInteger(value) ? String(value) : String(Number(value.toFixed(2)));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -558,7 +566,7 @@ onBeforeUnmount(() => {
|
|||||||
>
|
>
|
||||||
<template v-if="isStabilityTraining">
|
<template v-if="isStabilityTraining">
|
||||||
<text class="stability-progress__cost">
|
<text class="stability-progress__cost">
|
||||||
每秒失去{{ stabilityEnergyCostText }}点能量
|
每秒失去{{ stabilityEnergyCostPercentText }}%能量
|
||||||
</text>
|
</text>
|
||||||
<view v-if="countdownEnabled" class="stability-progress__countdown">
|
<view v-if="countdownEnabled" class="stability-progress__countdown">
|
||||||
<view
|
<view
|
||||||
|
|||||||
@@ -1855,6 +1855,7 @@ onBeforeUnmount(() => {
|
|||||||
:serverTimestamp="rhythmCountdownTimestamp"
|
:serverTimestamp="rhythmCountdownTimestamp"
|
||||||
:hitReq="rhythmHitReq"
|
:hitReq="rhythmHitReq"
|
||||||
:energyCostPerSec="stabilityEnergyCostPerSec"
|
:energyCostPerSec="stabilityEnergyCostPerSec"
|
||||||
|
:scoreSlot="stabilityScoreSlot"
|
||||||
:isVip="isVip"
|
:isVip="isVip"
|
||||||
:isSvip="isSvip"
|
:isSvip="isSvip"
|
||||||
:externalShootResultAudio="
|
:externalShootResultAudio="
|
||||||
|
|||||||
Reference in New Issue
Block a user