UI细节调整
This commit is contained in:
@@ -8,7 +8,6 @@ import ScoreResult from "@/components/ScoreResult.vue";
|
||||
import SButton from "@/components/SButton.vue";
|
||||
import Avatar from "@/components/Avatar.vue";
|
||||
import BowPower from "@/components/BowPower.vue";
|
||||
import StartCountdown from "@/components/StartCountdown.vue";
|
||||
import { createPractiseAPI, getHomeData } from "@/apis";
|
||||
import { generateCanvasImage } from "@/util";
|
||||
import { MESSAGETYPES } from "@/constants";
|
||||
@@ -17,7 +16,6 @@ import { storeToRefs } from "pinia";
|
||||
const store = useStore();
|
||||
const { user } = storeToRefs(store);
|
||||
const { updateUser } = store;
|
||||
const startCount = ref(false);
|
||||
const start = ref(false);
|
||||
const showScore = ref(false);
|
||||
const scores = ref([]);
|
||||
@@ -30,13 +28,7 @@ const onReady = async () => {
|
||||
await createPractiseAPI(total);
|
||||
currentRound.value = 0;
|
||||
scores.value = [];
|
||||
startCount.value = true;
|
||||
};
|
||||
|
||||
const onStart = () => {
|
||||
start.value = true;
|
||||
scores.value = [];
|
||||
currentRound.value = 0;
|
||||
};
|
||||
|
||||
async function onReceiveMessage(messages = []) {
|
||||
@@ -88,6 +80,7 @@ onUnmounted(() => {
|
||||
<BowPower :power="power" />
|
||||
</view>
|
||||
<BowTarget
|
||||
:start="start"
|
||||
:totalRound="start ? total : 0"
|
||||
:currentRound="currentRound"
|
||||
:scores="scores"
|
||||
@@ -115,12 +108,9 @@ onUnmounted(() => {
|
||||
:result="practiseResult"
|
||||
/>
|
||||
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
||||
<StartCountdown :start="startCount" :onFinish="onStart" />
|
||||
</view>
|
||||
<view :style="{ marginBottom: '20px' }">
|
||||
<SButton v-if="!startCount" :onClick="onReady"
|
||||
>准备好了,直接开始</SButton
|
||||
>
|
||||
<SButton v-if="!start" :onClick="onReady">准备好了,直接开始</SButton>
|
||||
</view>
|
||||
</Container>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user