feat: Breadcrumb add Icon
This commit is contained in:
parent
cb5dd34e17
commit
acde2c1004
@ -1,12 +1,15 @@
|
||||
<template>
|
||||
<n-breadcrumb>
|
||||
<n-breadcrumb-item v-for="item in route.matched" :key="item.path" @click="handleBreadClick(item.path)">
|
||||
<component :is="renderIcon(item.meta?.icon, { size: 16 })" v-if="item.meta?.icon" />
|
||||
{{ item.meta.title }}
|
||||
</n-breadcrumb-item>
|
||||
</n-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { renderIcon } from '@/utils/icon'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
|
@ -9,6 +9,7 @@ export default [
|
||||
meta: {
|
||||
title: '组件示例',
|
||||
role: ['admin'],
|
||||
icon: 'mdi:menu',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user