细节优化

This commit is contained in:
kron
2025-06-15 20:55:34 +08:00
parent 448f88a77e
commit c2b2d0bf99
12 changed files with 52 additions and 14 deletions

View File

@@ -43,14 +43,16 @@ const props = defineProps({
const showRoundTips = ref(false);
const showLatestArrow = ref(false);
const prevLength = ref(0);
const timer = ref(null);
watch(
() => props.scores,
(newVal) => {
if (newVal.length - prevLength.value === 1) {
if (timer.value) clearTimeout(timer.value);
showRoundTips.value = true;
showLatestArrow.value = true;
setTimeout(() => {
timer.value = setTimeout(() => {
showRoundTips.value = false;
}, 1000);
}
@@ -80,7 +82,7 @@ function calcRealY(num) {
"/" +
totalRound
}}</text>
<BowPower v-if="power > 0" :power="power" />
<BowPower :power="power" />
</view>
<view class="target">
<view