This commit is contained in:
kron
2025-06-28 20:51:50 +08:00
parent 770c0c42bb
commit 1af0edce2b
8 changed files with 14 additions and 4 deletions

View File

@@ -24,9 +24,9 @@ const props = defineProps({
});
const barColor = ref("#fed847");
const remain = ref(props.total);
const timer = ref(null);
const sound = ref(true);
watch(
() => props.tips,
@@ -87,8 +87,11 @@ onUnmounted(() => {
<view>
<image src="../static/shooter.png" mode="widthFix" />
<text>{{ remain === 0 ? "射箭时间到!" : tips }}</text>
<button>
<image src="../static/sound-yellow.png" mode="widthFix" />
<button hover-class="none" @click="() => (sound = !sound)">
<image
:src="`../static/sound${sound ? '' : '-off'}-yellow.png`"
mode="widthFix"
/>
</button>
</view>
<view>