Профиль хирургии
This commit is contained in:
@@ -7,7 +7,19 @@ import AppHeaderRole from "./AppHeaderRole.vue";
|
||||
import {computed, useSlots} from "vue";
|
||||
|
||||
const slots = useSlots()
|
||||
const hasHeaderExtra = computed(() => !!slots.headerExtra)
|
||||
const hasHeaderExtra = computed(() => {
|
||||
if (!slots.headerExtra) return false
|
||||
|
||||
const slotContent = slots.headerExtra()
|
||||
return slotContent && slotContent.length > 0 && slotContent[0].children.length > 0
|
||||
})
|
||||
|
||||
const hasHeaderSuffix = computed(() => {
|
||||
if (!slots.headerExtra) return false
|
||||
|
||||
const slotContent = slots.headerExtra()
|
||||
return slotContent && slotContent.length > 0 && slotContent[0].children.length > 0
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -20,7 +32,11 @@ const hasHeaderExtra = computed(() => !!slots.headerExtra)
|
||||
<slot name="headerExtra" />
|
||||
</NSpace>
|
||||
<div></div>
|
||||
<AppUserButton />
|
||||
<NFlex align="center" justify="end">
|
||||
<slot name="headerSuffix" />
|
||||
<NDivider v-if="hasHeaderSuffix" vertical />
|
||||
<AppUserButton />
|
||||
</NFlex>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user