UI优化
This commit is contained in:
@@ -22,6 +22,10 @@ const props = defineProps({
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
|
tipSrc: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const showPanel = ref(true);
|
const showPanel = ref(true);
|
||||||
const showComment = ref(false);
|
const showComment = ref(false);
|
||||||
@@ -40,7 +44,7 @@ setTimeout(() => {
|
|||||||
<template>
|
<template>
|
||||||
<view v-if="result.arrows && result.arrows.length > 0" class="container">
|
<view v-if="result.arrows && result.arrows.length > 0" class="container">
|
||||||
<view :class="['container-header', showPanel ? 'scale-in' : 'scale-out']">
|
<view :class="['container-header', showPanel ? 'scale-in' : 'scale-out']">
|
||||||
<image src="../static/finish-tip.png" mode="widthFix" />
|
<image :src="tipSrc" mode="widthFix" />
|
||||||
<image src="../static/finish-frame.png" mode="widthFix" />
|
<image src="../static/finish-frame.png" mode="widthFix" />
|
||||||
<text
|
<text
|
||||||
>完成<text class="gold-text">{{ total }}</text
|
>完成<text class="gold-text">{{ total }}</text
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const barColor = ref("#fed847");
|
const barColor = ref("#fed847");
|
||||||
|
|
||||||
const remain = ref(props.total);
|
const remain = ref(props.total);
|
||||||
const timer = ref(null);
|
const timer = ref(null);
|
||||||
|
const sound = ref(true);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.tips,
|
() => props.tips,
|
||||||
@@ -87,8 +87,11 @@ onUnmounted(() => {
|
|||||||
<view>
|
<view>
|
||||||
<image src="../static/shooter.png" mode="widthFix" />
|
<image src="../static/shooter.png" mode="widthFix" />
|
||||||
<text>{{ remain === 0 ? "射箭时间到!" : tips }}</text>
|
<text>{{ remain === 0 ? "射箭时间到!" : tips }}</text>
|
||||||
<button>
|
<button hover-class="none" @click="() => (sound = !sound)">
|
||||||
<image src="../static/sound-yellow.png" mode="widthFix" />
|
<image
|
||||||
|
:src="`../static/sound${sound ? '' : '-off'}-yellow.png`"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ const onClose = () => {
|
|||||||
:rowCount="6"
|
:rowCount="6"
|
||||||
:onClose="onClose"
|
:onClose="onClose"
|
||||||
:result="practiseResult"
|
:result="practiseResult"
|
||||||
|
tipSrc="../static/first-try-finish-tip.png"
|
||||||
/>
|
/>
|
||||||
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ onUnmounted(() => {
|
|||||||
:rowCount="6"
|
:rowCount="6"
|
||||||
:onClose="onComplete"
|
:onClose="onComplete"
|
||||||
:result="practiseResult"
|
:result="practiseResult"
|
||||||
|
tipSrc="../static/finish-tip.png"
|
||||||
/>
|
/>
|
||||||
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ onUnmounted(() => {
|
|||||||
:rowCount="9"
|
:rowCount="9"
|
||||||
:onClose="onComplete"
|
:onClose="onComplete"
|
||||||
:result="practiseResult"
|
:result="practiseResult"
|
||||||
|
tipSrc="../static/finish-tip.png"
|
||||||
/>
|
/>
|
||||||
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 13 KiB |
BIN
src/static/first-try-finish-tip.png
Normal file
BIN
src/static/first-try-finish-tip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
src/static/sound-off-yellow.png
Normal file
BIN
src/static/sound-off-yellow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 932 B |
Reference in New Issue
Block a user