This commit is contained in:
kron
2025-07-05 16:50:54 +08:00
parent 1c70471959
commit c269a4b431
2 changed files with 26 additions and 30 deletions

View File

@@ -5,6 +5,7 @@ import Avatar from "@/components/Avatar.vue";
import BowData from "@/components/BowData.vue";
import ScrollList from "@/components/ScrollList.vue";
import { getBattleListAPI, getPractiseResultListAPI } from "@/apis";
import { meleeAvatarColors } from "@/constants";
import { ref } from "vue";
@@ -105,11 +106,15 @@ const onPractiseLoading = async (page) => {
</view>
</block>
</view>
<view v-if="item.mode === 2" class="contest-multi">
<view v-if="item.mode === 2" class="contest-melee">
<view
class="player"
v-for="(p, index2) in item.players"
:key="index2"
:style="{
width: `${Math.max(100 / item.players.length, 18)}vw`,
backgroundColor: meleeAvatarColors[index2],
}"
>
<Avatar :rank="index2 + 1" :src="p.avatar" />
<text>{{ p.name }}</text>
@@ -143,11 +148,15 @@ const onPractiseLoading = async (page) => {
/>
</view>
</view>
<view v-if="item.mode === 2" class="contest-multi">
<view v-if="item.mode === 2" class="contest-melee">
<view
class="player"
v-for="(p, index2) in item.players"
:key="index2"
:style="{
width: `${Math.max(100 / item.players.length, 18)}vw`,
backgroundColor: meleeAvatarColors[index2],
}"
>
<Avatar :rank="index2 + 1" :src="p.avatar" />
<text>{{ p.name }}</text>
@@ -238,6 +247,7 @@ const onPractiseLoading = async (page) => {
padding-top: 10px;
padding-bottom: 5px;
position: relative;
flex: 0 0 auto;
}
.player > text {
margin-top: 5px;
@@ -255,10 +265,11 @@ const onPractiseLoading = async (page) => {
bottom: 0;
}
.contest-team,
.contest-multi {
.contest-melee {
width: 100%;
display: flex;
justify-content: space-around;
margin-bottom: 10px;
overflow-x: auto;
}
.contest-team > view {
width: 50%;
@@ -269,24 +280,6 @@ const onPractiseLoading = async (page) => {
.contest-team > view:last-child {
background-color: #692735;
}
.contest-multi > view {
width: 20%;
}
.contest-multi > view:nth-child(1) {
background-color: #364469;
}
.contest-multi > view:nth-child(2) {
background-color: #692735;
}
.contest-multi > view:nth-child(3) {
background-color: #934b4b;
}
.contest-multi > view:nth-child(4) {
background-color: #a98b69;
}
.contest-multi > view:nth-child(5) {
background-color: #8268a2;
}
.practice-record {
color: #fff9;
border-bottom: 1px solid #fff9;