index.vue 321 B

123456789101112131415
  1. <template>
  2. <slot v-if="isHost"></slot>
  3. </template>
  4. <script setup lang="ts">
  5. import { computed } from 'vue'
  6. import { useRoomStore } from '@/stores'
  7. const props = defineProps<{
  8. roomId?: string
  9. }>()
  10. const roomStore = useRoomStore()
  11. const isHost = computed(() => roomStore.isHost)
  12. </script>