Skip to content

Commit 8700663

Browse files
committed
refactor: update layout
1 parent ee8af34 commit 8700663

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/components/AppSidebar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<CSidebar
3-
class="border-end"
3+
class="sidebar-dark border-end"
44
position="fixed"
55
:unfoldable="sidebarUnfoldable"
66
:visible="sidebarVisible"

src/components/AppSidebarNav.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const AppSidebarNav = defineComponent({
6262
return h(
6363
CNavGroup,
6464
{
65+
compact: true,
6566
...(firstRender.value && {
6667
visible: item.items.some((child) => isActiveItem(route, child)),
6768
}),
@@ -97,11 +98,16 @@ const AppSidebarNav = defineComponent({
9798
},
9899
{
99100
default: () => [
100-
item.icon &&
101-
h(resolveComponent('CIcon'), {
102-
customClassName: 'nav-icon',
103-
name: item.icon,
104-
}),
101+
item.icon
102+
? h(resolveComponent('CIcon'), {
103+
customClassName: 'nav-icon',
104+
name: item.icon,
105+
})
106+
: h(
107+
'span',
108+
{ class: 'nav-icon' },
109+
h('span', { class: 'nav-icon-bullet' }),
110+
),
105111
item.name,
106112
item.badge &&
107113
h(

0 commit comments

Comments
 (0)