Skip to content

Commit

Permalink
fix: fixed sidebar menu display
Browse files Browse the repository at this point in the history
  • Loading branch information
WRXinYue committed Feb 8, 2025
1 parent 3ae2598 commit 6c2dac4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions theme/components/SakuraSidebarLinkItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ defineProps<{
</script>

<template>
<SakuraNavLink v-if="item" v-bind="item">
<SakuraSidebarCount :locale="item.locale" />
</SakuraNavLink>
<template v-if="item">
<SakuraNavLink v-bind="item">
<SakuraSidebarCount :locale="item.locale" />
</SakuraNavLink>
</template>

<ul v-else-if="items?.length" class="sakura-sidebar-link-items">
<li v-for="(_item, index) in items" :key="index">
<SakuraSidebarLinkItem :key="index" :item="item" class="sakura-sidebar-link-item" />
<SakuraSidebarLinkItem v-if="_item.items" :items="_item.items" class="sakura-sidebar-link-sub-items" />
<li v-for="(navItem, index) in items" :key="index">
<SakuraSidebarLinkItem :item="navItem" class="sakura-sidebar-link-item" />
<SakuraSidebarLinkItem v-if="navItem.items" :items="navItem.items" class="sakura-sidebar-link-sub-items" />
</li>
</ul>
</template>
Expand Down

0 comments on commit 6c2dac4

Please sign in to comment.