功能完善
This commit is contained in:
@@ -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'
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user