Browse Source
feat: support logo text slot (#5872)
* 基础布局中的LOGO的文字区域允许通过插槽logo-text定制
pull/5876/head
Netfan
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
17 additions and
8 deletions
-
packages/@core/ui-kit/shadcn-ui/src/components/logo/logo.vue
-
packages/effects/layouts/src/basic/layout.vue
|
|
|
@ -55,12 +55,13 @@ withDefaults(defineProps<Props>(), { |
|
|
|
:size="logoSize" |
|
|
|
class="relative rounded-none bg-transparent" |
|
|
|
/> |
|
|
|
<span |
|
|
|
v-if="!collapsed" |
|
|
|
class="text-foreground truncate text-nowrap font-semibold" |
|
|
|
> |
|
|
|
{{ text }} |
|
|
|
</span> |
|
|
|
<template v-if="!collapsed"> |
|
|
|
<slot name="text"> |
|
|
|
<span class="text-foreground truncate text-nowrap font-semibold"> |
|
|
|
{{ text }} |
|
|
|
</span> |
|
|
|
</slot> |
|
|
|
</template> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -228,7 +228,11 @@ const headerSlots = computed(() => { |
|
|
|
:text="preferences.app.name" |
|
|
|
:theme="showHeaderNav ? headerTheme : theme" |
|
|
|
@click="clickLogo" |
|
|
|
/> |
|
|
|
> |
|
|
|
<template v-if="$slots['logo-text']" #text> |
|
|
|
<slot name="logo-text"></slot> |
|
|
|
</template> |
|
|
|
</VbenLogo> |
|
|
|
</template> |
|
|
|
<!-- 头部区域 --> |
|
|
|
<template #header> |
|
|
|
@ -310,7 +314,11 @@ const headerSlots = computed(() => { |
|
|
|
v-if="preferences.logo.enable" |
|
|
|
:text="preferences.app.name" |
|
|
|
:theme="theme" |
|
|
|
/> |
|
|
|
> |
|
|
|
<template v-if="$slots['logo-text']" #text> |
|
|
|
<slot name="logo-text"></slot> |
|
|
|
</template> |
|
|
|
</VbenLogo> |
|
|
|
</template> |
|
|
|
|
|
|
|
<template #tabbar> |
|
|
|
|