射箭记录完善

This commit is contained in:
kron
2025-06-14 22:45:07 +08:00
parent aacfc17a01
commit 9a051aca20
6 changed files with 135 additions and 76 deletions

View File

@@ -30,6 +30,10 @@ const props = defineProps({
type: Array,
default: () => [],
},
blueScores: {
type: Array,
default: () => [],
},
showE: {
type: Boolean,
default: true,
@@ -88,13 +92,27 @@ function calcRealY(num) {
<image
v-for="(bow, index) in scores"
:key="index"
src="../static/hit-icon.png"
:src="
index === scores.length - 1 && !blueScores.length
? '../static/hit-icon-green.png'
: '../static/hit-icon.png'
"
:class="`hit ${index + 1 === scores.length ? 'pump-in' : ''}`"
:style="{
left: calcRealX(bow.x),
top: calcRealY(bow.y),
}"
/>
<image
v-for="(bow, index) in blueScores"
:key="index"
src="../static/hit-icon-blue.png"
:class="`hit ${index + 1 === blueScores.length ? 'pump-in' : ''}`"
:style="{
left: calcRealX(bow.x),
top: calcRealY(bow.y),
}"
/>
<image src="../static/bow-target.png" mode="widthFix" />
</view>
<view v-if="avatar" class="footer">