添加练习超时,重新挑战

This commit is contained in:
kron
2025-07-05 13:12:58 +08:00
parent 79c869a3f3
commit 054bf2ef21
8 changed files with 88 additions and 29 deletions

View File

@@ -56,6 +56,7 @@ watch(
(newVal, oldVal) => {
if (newVal === false) {
if (timer.value) clearInterval(timer.value);
remain.value = props.total;
}
if (!oldVal && newVal === true) {
setTimeout(() => {
@@ -86,7 +87,7 @@ onUnmounted(() => {
<view class="container">
<view>
<image src="../static/shooter.png" mode="widthFix" />
<text>{{ remain === 0 ? "射箭时间到!" : tips }}</text>
<text>{{ start && remain === 0 ? "射箭时间到!" : tips }}</text>
<button hover-class="none" @click="() => (sound = !sound)">
<image
:src="`../static/sound${sound ? '' : '-off'}-yellow.png`"