mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 13:28:38 +08:00
新增预设插槽 header-after-menu、main-sidebar-after-menu 和 sub-sidebar-after-menu
This commit is contained in:
@@ -46,6 +46,7 @@ const { switchTo } = useMenu()
|
||||
</template>
|
||||
</div>
|
||||
</FaScrollArea>
|
||||
<component :is="useSlots('header-after-menu')" />
|
||||
<div class="flex-center">
|
||||
<AccountButton only-avatar dropdown-side="bottom" class="size-12 p-2" />
|
||||
</div>
|
||||
|
||||
@@ -65,6 +65,7 @@ onUnmounted(() => {
|
||||
</template>
|
||||
</div>
|
||||
</FaScrollArea>
|
||||
<component :is="useSlots('main-sidebar-after-menu')" />
|
||||
<div class="flex-center px-4 py-3">
|
||||
<AccountButton only-avatar :button-variant="settingsStore.settings.menu.mode === 'side' ? 'secondary' : 'ghost'" class="size-12 p-2" />
|
||||
</div>
|
||||
|
||||
@@ -74,6 +74,7 @@ watch(() => menuStore.actived, (val, oldVal) => {
|
||||
<FaIcon name="toolbar-collapse" class="size-4" />
|
||||
</FaButton>
|
||||
</div>
|
||||
<component :is="useSlots('sub-sidebar-after-menu')" />
|
||||
<div v-if="settingsStore.settings.menu.mode === 'single'" class="flex-center px-4 pb-3">
|
||||
<AccountButton :only-avatar="settingsStore.settings.menu.subMenuCollapse" dropdown-align="center" :dropdown-side="settingsStore.settings.menu.subMenuCollapse ? 'right' : 'top'" button-variant="secondary" :class="{ 'w-full': !settingsStore.settings.menu.subMenuCollapse }" />
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@ function upgrade() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex-center p-4">
|
||||
<div class="flex-center">
|
||||
<FaPopover align="end" side="right" class="min-w-auto p-0">
|
||||
<FaButton size="icon" variant="ghost" class="size-12">
|
||||
<FaIcon name="i-noto:crown" class="text-8 filter-grayscale" />
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
import { pascalCase } from 'scule'
|
||||
|
||||
type Slots =
|
||||
'header-start' | 'header-end' | 'header-after-logo' |
|
||||
'main-sidebar-top' | 'main-sidebar-bottom' | 'main-sidebar-after-logo' |
|
||||
'sub-sidebar-top' | 'sub-sidebar-bottom' | 'sub-sidebar-after-logo' |
|
||||
'header-start' | 'header-after-logo' | 'header-after-menu' | 'header-end' |
|
||||
'main-sidebar-top' | 'main-sidebar-after-logo' | 'main-sidebar-after-menu' | 'main-sidebar-bottom' |
|
||||
'sub-sidebar-top' | 'sub-sidebar-after-logo' | 'sub-sidebar-after-menu' | 'sub-sidebar-bottom' |
|
||||
'tabbar-start' | 'tabbar-end' |
|
||||
'toolbar-start' | 'toolbar-end' |
|
||||
'free-position'
|
||||
|
||||
Reference in New Issue
Block a user