Skip to content

Commit 520287e

Browse files
committed
fix(NcAppSidebarTabs): fix render when tab and tabs are in different vue
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
1 parent fdce835 commit 520287e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/components/NcAppSidebar/NcAppSidebarTabs.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
role="tab"
5050
@click.prevent="setActive(tab.id)">
5151
<span class="app-sidebar-tabs__tab-icon">
52-
<NcVNodes :vnodes="tab.renderIcon()" />
52+
<NcVNodes :vnodes="tab.renderIcon()">
53+
<span :class="tab.icon" />
54+
</NcVNodes>
5355
</span>
5456
{{ tab.name }}
5557
</a>

src/components/NcAppSidebarTab/NcAppSidebarTab.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ export default {
126126
},
127127
128128
/**
129-
* Render tab's icon from slot or icon prop
129+
* Render tab's icon slot if any
130130
*
131-
* @return {import('vue').VNode|import('vue').VNode[]}
131+
* @return {import('vue').VNode[]}
132132
*/
133133
renderIcon() {
134-
return this.$slots.icon || this.$scopedSlots.icon?.() || h('span', { staticClass: this.icon })
134+
return this.$scopedSlots.icon?.()
135135
},
136136
},
137137
}

0 commit comments

Comments
 (0)