细节优化
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user