相框获取字段修改

This commit is contained in:
kron
2025-07-14 15:13:10 +08:00
parent e685383581
commit 1de8ba6d9d
7 changed files with 29 additions and 33 deletions

View File

@@ -10,7 +10,7 @@ const props = defineProps({
type: String,
default: "",
},
score: {
rankLvl: {
type: Number,
default: undefined,
},
@@ -33,10 +33,10 @@ const props = defineProps({
});
const avatarFrame = ref("");
watch(
() => [config.value, props.score],
() => [config.value, props.rankLvl],
() => {
if (props.score !== undefined) {
avatarFrame.value = getLvlImage(props.score);
if (props.rankLvl !== undefined) {
avatarFrame.value = getLvlImage(props.rankLvl);
}
},
{

View File

@@ -50,7 +50,7 @@ defineProps({
</view>
<view v-if="blueTeam.length && redTeam.length" class="players">
<view>
<Avatar :src="blueTeam[0].avatar" :score="blueTeam[0].totalScore" />
<Avatar :src="blueTeam[0].avatar" :rankLvl="blueTeam[0].rankLvl" />
<text class="player-name">{{ blueTeam[0].name }}</text>
<image
v-if="winner === 1"
@@ -62,7 +62,7 @@ defineProps({
<Avatar
v-if="redTeam[0]"
:src="redTeam[0].avatar"
:score="redTeam[0].totalScore"
:rankLvl="redTeam[0].rankLvl"
/>
<text class="player-name">{{ redTeam[0].name }}</text>
<image

View File

@@ -29,7 +29,7 @@ const props = defineProps({
<AppBackground :type="1" />
<view class="header">
<view>
<Avatar :src="user.avatar" :score="user.scores" :size="45" />
<Avatar :src="user.avatar" :rankLvl="user.rankLvl" :size="45" />
<view>
<text>{{ user.nickName }}</text>
<text>{{ user.lvlName }}</text>

View File

@@ -58,7 +58,7 @@ watch(
<view class="container" :style="{ width: containerWidth }">
<block v-if="user.id">
<Avatar
:score="user.scores"
:rankLvl="user.rankLvl"
:src="user.avatar"
:onClick="toUserPage"
:size="42"
@@ -203,7 +203,7 @@ watch(
}
.rank-info {
width: 68px;
width: 70px;
text-align: left;
font-size: 12px;
position: relative;