无需组局
This commit is contained in:
parent
a3e160ffe1
commit
e713369839
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user