mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-04-06 03:57:54 +08:00
Update Breadcrumb.vue
This commit is contained in:
parent
651d13e238
commit
efaf6eff9e
@ -12,14 +12,14 @@ const appStore = useAppStore()
|
|||||||
<template>
|
<template>
|
||||||
<TransitionGroup v-if="appStore.showBreadcrumb" name="list" tag="ul" style="display: flex; gap:1em;">
|
<TransitionGroup v-if="appStore.showBreadcrumb" name="list" tag="ul" style="display: flex; gap:1em;">
|
||||||
<n-el
|
<n-el
|
||||||
v-for="(item) in routes"
|
v-for="(item, index) in routes"
|
||||||
:key="item.path"
|
:key="item.path"
|
||||||
tag="li" style="
|
tag="li" style="
|
||||||
color: var(--text-color-2);
|
color: var(--text-color-2);
|
||||||
transition: 0.3s var(--cubic-bezier-ease-in-out);
|
transition: 0.3s var(--cubic-bezier-ease-in-out);
|
||||||
"
|
"
|
||||||
class="flex-center gap-2 cursor-pointer split"
|
class="flex-center gap-2 cursor-pointer split"
|
||||||
@click="router.push(item.path)"
|
@click="() => index === 0 ? router.push(item.path) : console.log('route not allowed')"
|
||||||
>
|
>
|
||||||
<nova-icon v-if="appStore.showBreadcrumbIcon" :icon="item.meta.icon" />
|
<nova-icon v-if="appStore.showBreadcrumbIcon" :icon="item.meta.icon" />
|
||||||
<span class="whitespace-nowrap">{{ $t(`route.${String(item.name)}`, item.meta.title) }}</span>
|
<span class="whitespace-nowrap">{{ $t(`route.${String(item.name)}`, item.meta.title) }}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user