Files
webgame-frontend/src/views/game/components/SpectatorBar.vue

36 lines
745 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<div class="spectator-bar">
<span class="spectator-bar__icon">👀</span>
<span class="spectator-bar__text">
观战中{{ spectatorCount }}
</span>
</div>
</template>
<script setup lang="ts">
import { useRoomStore } from '@/stores'
import { storeToRefs } from 'pinia'
const store = useRoomStore()
const { spectatorCount } = storeToRefs(store)
</script>
<style scoped lang="scss">
.spectator-bar {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
height: 32px;
background-color: var(--bg-surface);
border-top: 1px solid var(--border-light);
font-size: 12px;
color: var(--text-secondary);
flex-shrink: 0;
}
.spectator-bar__icon {
font-size: 14px;
}
</style>