1v1排位数据交互完善

This commit is contained in:
kron
2025-06-08 20:59:41 +08:00
parent 312906fec3
commit 80e0b07c0e
10 changed files with 232 additions and 84 deletions

View File

@@ -4,12 +4,24 @@ defineProps({
type: Array,
default: () => [],
},
bluePoints: {
type: Number,
default: 0,
},
redPoints: {
type: Number,
default: 0,
},
});
</script>
<template>
<view class="container">
<image src="../static/battle-header.png" mode="widthFix" />
<view>
<image src="../static/battle-header-melee.png" mode="widthFix" />
<text>蓝队({{ bluePoints }})</text>
<text>红队({{ redPoints }})</text>
</view>
<view class="players">
<view>
<view v-for="(result, index) in roundResults" :key="index">
@@ -28,9 +40,11 @@ defineProps({
<view v-for="(result, index) in roundResults" :key="index">
<text>Round {{ index + 1 }}</text>
<view>
<text>{{ result.redArrows
<text>{{
result.redArrows
.map((item) => item.ring)
.reduce((last, next) => last + next, 0) }}</text>
.reduce((last, next) => last + next, 0)
}}</text>
<text></text>
</view>
</view>
@@ -42,13 +56,29 @@ defineProps({
<style scoped>
.container {
width: 100%;
position: relative;
margin-top: 20px;
}
.container > image:first-child {
.container > view:first-child {
position: relative;
display: flex;
justify-content: space-around;
align-items: center;
font-size: 13px;
}
.container > view:first-child > image:first-child {
position: absolute;
width: 100%;
top: -10px;
top: -6px;
}
.container > view:first-child > text {
z-index: 1;
margin-top: 2px;
}
.container > view:first-child > text:nth-child(2) {
color: #364469;
}
.container > view:first-child > text:nth-child(3) {
color: #692735;
}
.players {
display: flex;
@@ -60,7 +90,7 @@ defineProps({
align-items: center;
justify-content: center;
color: #fff;
padding-top: 20px;
padding-top: 5px;
}
.players > view:first-child {
background-color: #364469;