From e71336983917bd3cf271623f1f815e160746d3f4 Mon Sep 17 00:00:00 2001 From: 18631081161 <2088094923@qq.com> Date: Tue, 9 Dec 2025 22:41:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E9=9C=80=E7=BB=84=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/index/MahjongCard.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/components/index/MahjongCard.vue b/components/index/MahjongCard.vue index 6fb3235..ff24a24 100644 --- a/components/index/MahjongCard.vue +++ b/components/index/MahjongCard.vue @@ -97,7 +97,13 @@ const playerPositions = computed(() => { const joinedCount = joinPerson.length // 根据总人数确定布局 - if (personCount === 2) { + if (personCount === 1) { + // 1人局:只显示自己,头像放在左侧位置(第二行左) + return { + positions: [null, joinPerson[0] || null, null, null], + joinPositions: [false, false, false, false] + } + } else if (personCount === 2) { // 2人局:第二行左边和右边 return { positions: [null, joinPerson[0] || null, joinPerson[1] || null, null], @@ -169,7 +175,10 @@ const getPlayerAtPosition = (position) => { const getJoinPlayerAtPosition = (index) => { const personCount = props.item.personCount - if (personCount === 2) { + if (personCount === 1) { + // 1人局:仅展示左侧位置(索引2) + return index === 2 + } else if (personCount === 2) { // 2人局:第二行左边和右边 return [2, 3].includes(index) } else if (personCount === 3) {