fix:新增分享房间图片&2v2+3v3+大乱斗只有管理员房间才展示踢人按钮
This commit is contained in:
@@ -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])"
|
||||
|
||||
Reference in New Issue
Block a user