crm/frontend/src/components/LayoutHeader.vue
2024-05-27 14:14:14 +05:30

24 lines
568 B
Vue

<template>
<Teleport to="#app-header" v-if="showHeader">
<slot>
<header class="flex h-12 items-center justify-between py-2.5 pl-5">
<div class="flex items-center gap-2">
<slot name="left-header" />
</div>
<div class="flex items-center gap-2">
<slot name="right-header" class="flex items-center gap-2" />
</div>
</header>
</slot>
</Teleport>
</template>
<script setup>
import { ref, nextTick } from 'vue'
const showHeader = ref(false)
nextTick(() => {
showHeader.value = true
})
</script>