fixed elements
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user