refactor: update layout

This commit is contained in:
mrholek
2023-10-01 13:15:47 +02:00
parent ee8af34a1b
commit 8700663d24
2 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<template> <template>
<CSidebar <CSidebar
class="border-end" class="sidebar-dark border-end"
position="fixed" position="fixed"
:unfoldable="sidebarUnfoldable" :unfoldable="sidebarUnfoldable"
:visible="sidebarVisible" :visible="sidebarVisible"
+11 -5
View File
@@ -62,6 +62,7 @@ const AppSidebarNav = defineComponent({
return h( return h(
CNavGroup, CNavGroup,
{ {
compact: true,
...(firstRender.value && { ...(firstRender.value && {
visible: item.items.some((child) => isActiveItem(route, child)), visible: item.items.some((child) => isActiveItem(route, child)),
}), }),
@@ -97,11 +98,16 @@ const AppSidebarNav = defineComponent({
}, },
{ {
default: () => [ default: () => [
item.icon && item.icon
h(resolveComponent('CIcon'), { ? h(resolveComponent('CIcon'), {
customClassName: 'nav-icon', customClassName: 'nav-icon',
name: item.icon, name: item.icon,
}), })
: h(
'span',
{ class: 'nav-icon' },
h('span', { class: 'nav-icon-bullet' }),
),
item.name, item.name,
item.badge && item.badge &&
h( h(