添加练习超时,重新挑战

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

@@ -1,5 +1,5 @@
<script setup>
import { ref } from "vue";
import { ref, onMounted } from "vue";
import IconButton from "@/components/IconButton.vue";
import SButton from "@/components/SButton.vue";
import ScreenHint from "@/components/ScreenHint.vue";
@@ -10,6 +10,10 @@ const props = defineProps({
type: Function,
default: () => {},
},
total: {
type: Number,
default: 0,
},
rowCount: {
type: Number,
default: 0,
@@ -26,15 +30,20 @@ const props = defineProps({
const showPanel = ref(true);
const showComment = ref(false);
const showBowData = ref(false);
const finished = ref(false);
const closePanel = () => {
showPanel.value = false;
setTimeout(() => {
props.onClose();
}, 300);
};
setTimeout(() => {
showPanel.value = true;
}, 300);
onMounted(() => {
finished.value =
props.result.arrows && props.result.arrows.length === props.total;
});
// setTimeout(() => {
// showPanel.value = true;
// }, 300);
</script>
<template>
@@ -73,13 +82,24 @@ setTimeout(() => {
</view>
</view>
<view>
<IconButton name="分享" src="../static/share.png" :onClick="wxShare" />
<IconButton
name="教练点评"
src="../static/review.png"
:onClick="() => (showComment = true)"
/>
<SButton width="70vw" :rounded="30" :onClick="closePanel">完成</SButton>
<block v-if="finished">
<IconButton
name="分享"
src="../static/share.png"
:onClick="wxShare"
/>
<IconButton
name="教练点评"
src="../static/review.png"
:onClick="() => (showComment = true)"
/>
</block>
<SButton
:width="finished ? '70vw' : 'calc(100vw - 20px)'"
:rounded="30"
:onClick="closePanel"
>{{ finished ? "完成" : "重新挑战" }}</SButton
>
</view>
</view>
<ScreenHint :show="showComment" :onClose="() => (showComment = false)">