fix:新增分享房间图片&2v2+3v3+大乱斗只有管理员房间才展示踢人按钮

This commit is contained in:
2026-05-14 10:05:50 +08:00
parent 34a32b108c
commit 1c75c06eaa
4 changed files with 33 additions and 8 deletions

View File

@@ -14,6 +14,11 @@ const props = defineProps({
type: Function,
default: () => {},
},
/** 当前用户是否为房主;仅房主可见踢人按钮 */
isOwner: {
type: Boolean,
default: false,
},
});
const seats = new Array(props.total).fill(1);
</script>
@@ -45,8 +50,9 @@ const seats = new Array(props.total).fill(1);
mode="widthFix"
class="player-bg"
/> -->
<!-- 仅房主isOwner=true且非空座位时展示踢人按钮 -->
<button
v-if="index > 0 && players[index]"
v-if="index > 0 && players[index] && isOwner"
hover-class="none"
class="remove-player"
@click="() => removePlayer(players[index])"