bug 修复

This commit is contained in:
kron
2025-08-17 10:33:41 +08:00
parent 8110a0f5c1
commit b31689b19f
4 changed files with 14 additions and 6 deletions

View File

@@ -45,7 +45,10 @@ defineProps({
<view
v-for="(player, index) in blueTeam"
:key="index"
:style="{ margin: blueTeam.length === 2 ? '0 12px' : '0 6px' }"
:style="{
margin: blueTeam.length === 2 ? '0 12px' : '0 6px',
width: `${100 / blueTeam.length - blueTeam.length * 3}%`,
}"
>
<Avatar :src="player.avatar" :rankLvl="player.rankLvl" />
<text class="player-name">{{ player.name }}</text>
@@ -60,7 +63,10 @@ defineProps({
<view
v-for="(player, index) in redTeam"
:key="index"
:style="{ margin: redTeam.length === 2 ? '0 12px' : '0 6px' }"
:style="{
margin: redTeam.length === 2 ? '0 12px' : '0 6px',
width: `${100 / redTeam.length - redTeam.length * 3}%`,
}"
>
<Avatar :src="player.avatar" :rankLvl="player.rankLvl" />
<text class="player-name">{{ player.name }}</text>
@@ -164,7 +170,7 @@ defineProps({
}
.player-name {
margin-top: 5px;
width: 80%;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;