1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2026-01-22 15:40:21 +08:00

feat: 支持菜单多色图标

This commit is contained in:
zclzone
2024-03-20 09:46:56 +08:00
parent a63e72bc2f
commit 2599ea2060
3 changed files with 52 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ export const usePermissionStore = defineStore('permission', {
key: route.name,
path: route.path,
originPath: route.meta.originPath,
icon: () => h('i', { class: `${route.meta.icon}?mask text-16` }),
icon: () => h('i', { class: `${route.meta.icon} text-16` }),
order: item.order ?? 0,
}
const children = item.children?.filter((item) => item.type === 'MENU') || []
@@ -61,7 +61,7 @@ export const usePermissionStore = defineStore('permission', {
component: item.component,
meta: {
originPath,
icon: item.icon,
icon: item.icon + ({ bg: '', mask: '?mask' }[item.iconMode] ?? '?mask'),
title: item.name,
layout: item.layout,
keepAlive: !!item.keepAlive,