fixed elements

This commit is contained in:
2024-05-01 13:59:50 +02:00
parent 7b4d6551ee
commit 7536f0e3d5
9 changed files with 283 additions and 86 deletions
+3 -11
View File
@@ -1,19 +1,11 @@
<script setup lang="ts">
import goStore from '@/netcode';
const players = useState<{ [key: string]: any }>('players')
const player = computed(() => Array.from(goStore.players.keys()).sort((k) => {
if (goStore.self?.uuid === k) {
return -1
} else {
return 1
}
}))
</script>
<template>
<div v-for="k in player">
<PlayerSlot :player="goStore.players.get(k)!" />
<div v-for="[k, l] in goStore.players">
<PlayerSlot :player="l" v-if="l !== goStore.self" :key="k" />
</div>
<SelfView v-if="goStore.self" :player="goStore.self"></SelfView>
</template>