射箭记录完善
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user