功能完善

This commit is contained in:
kron
2025-06-15 15:53:57 +08:00
parent 7ac84a6129
commit 448f88a77e
21 changed files with 424 additions and 178 deletions

View File

@@ -41,16 +41,20 @@ const props = defineProps({
});
const showRoundTips = ref(false);
const showLatestArrow = ref(false);
const prevLength = ref(0);
watch(
() => props.scores,
(newVal) => {
if (newVal.length > 0) {
if (newVal.length - prevLength.value === 1) {
showRoundTips.value = true;
showLatestArrow.value = true;
setTimeout(() => {
showRoundTips.value = false;
}, 2000);
}, 1000);
}
prevLength.value = newVal.length;
},
{
deep: true,
@@ -93,7 +97,7 @@ function calcRealY(num) {
v-for="(bow, index) in scores"
:key="index"
:src="
index === scores.length - 1 && !blueScores.length
index === scores.length - 1 && !blueScores.length && showLatestArrow
? '../static/hit-icon-green.png'
: '../static/hit-icon.png'
"