Skip to content

Commit

Permalink
feat: add icontype to meny opts
Browse files Browse the repository at this point in the history
  • Loading branch information
50l3r committed Oct 19, 2024
1 parent 83d384d commit c5bfd31
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 28 deletions.
1 change: 1 addition & 0 deletions src/config/_menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type MenuItem = {
disabled?: boolean
route: RouteLocationRaw
icon: string
iconType?: 'fas' | 'far' | 'fab' | 'fad'
auth?: boolean
pages?: MenuItem[]
}
Expand Down
36 changes: 8 additions & 28 deletions src/layouts/main/partials/aside/menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
>
<k-icon
:icon="menuItem.icon"
type="fal"
:type="
menuItem.iconType || 'fal'
"
/>
</span>

Expand Down Expand Up @@ -86,7 +88,7 @@
>
<k-icon
:icon="menuItem.icon"
type="fal"
:type="menuItem.iconType || 'fal'"
/>
</span>
<span
Expand Down Expand Up @@ -148,11 +150,13 @@
<span
v-if="item2.icon"
class="k-menu-icon"
type="fal"
>
<k-icon
:icon="item2.icon"
type="fal"
:type="
item2.iconType ||
'fal'
"
/>
</span>

Expand All @@ -162,33 +166,9 @@
>
{{ item2.title }}
</span>

<!-- <k-icon
v-if="item2.pages"
icon="chevron-down"
class="k-menu-chevron"
/> -->
</button>
</router-link>
</k-tooltip>

<!-- <div
class="menu-sub menu-sub-accordion"
>
<template
v-for="(
item3, k
) in item2.pages"
:key="k"
>
<div
v-if="checkRoles(item3)"
class="menu-item"
>
<menu-item :item="item3" />
</div>
</template>
</div> -->
</li>
</template>
</ul>
Expand Down

0 comments on commit c5bfd31

Please sign in to comment.