Skip to content

Commit

Permalink
feat: breadcrumb add menu icon
Browse files Browse the repository at this point in the history
  • Loading branch information
flingyp committed Dec 28, 2023
1 parent 8bf5aeb commit 246753b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ declare global {
const useDebounce: typeof import('@vueuse/core')['useDebounce']
const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn']
const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory']
const useDemoRender: typeof import('./src/composables/common/useDemoRender/index')['default']
const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion']
const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation']
const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio']
Expand Down Expand Up @@ -486,6 +487,7 @@ declare module 'vue' {
readonly useDebounce: UnwrapRef<typeof import('@vueuse/core')['useDebounce']>
readonly useDebounceFn: UnwrapRef<typeof import('@vueuse/core')['useDebounceFn']>
readonly useDebouncedRefHistory: UnwrapRef<typeof import('@vueuse/core')['useDebouncedRefHistory']>
readonly useDemoRender: UnwrapRef<typeof import('./src/composables/common/useDemoRender/index')['default']>
readonly useDeviceMotion: UnwrapRef<typeof import('@vueuse/core')['useDeviceMotion']>
readonly useDeviceOrientation: UnwrapRef<typeof import('@vueuse/core')['useDeviceOrientation']>
readonly useDevicePixelRatio: UnwrapRef<typeof import('@vueuse/core')['useDevicePixelRatio']>
Expand Down
6 changes: 5 additions & 1 deletion src/layout/components/GlobalBreadCrumbMenu.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { useDeepClone } from '@flypeng/tool/browser';
import { VAdmireMenuOption } from 'naive-ui';
import RenderIconify from '~/components/common/RenderIconify.vue';
import { transformMenu } from '~/utils';
const { t } = useI18n();
Expand Down Expand Up @@ -28,7 +29,10 @@ const clickBreadCrumbItem = (key: string) => {
<NBreadcrumb>
<NBreadcrumbItem v-for="item in transformMenuList" :key="item.key">
<NDropdown :options="item.children" @select="clickBreadCrumbItem">
<span>{{ item.label }}</span>
<div class="flex items-center space-x-1">
<RenderIconify :icon="item.iconLabel" />
<span>{{ item.label }}</span>
</div>
</NDropdown>
</NBreadcrumbItem>
</NBreadcrumb>
Expand Down

0 comments on commit 246753b

Please sign in to comment.