feat
This commit is contained in:
@@ -6,13 +6,7 @@ import { listenerRouteChange } from '@/utils/route-listener'
|
||||
import { compile, computed, defineComponent, h, ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import type { RouteMeta } from 'vue-router'
|
||||
import {
|
||||
isNavigationFailure,
|
||||
NavigationFailureType,
|
||||
RouteRecordRaw,
|
||||
useRoute,
|
||||
useRouter,
|
||||
} from 'vue-router'
|
||||
import { isNavigationFailure, NavigationFailureType, RouteRecordRaw, useRoute, useRouter } from 'vue-router'
|
||||
import useMenuTree from './use-menu-tree'
|
||||
import { COMMON_ICONS } from '@/views/ops/pages/system-settings/menu-management/menuIcons'
|
||||
|
||||
@@ -107,7 +101,7 @@ export default defineComponent({
|
||||
// 获取图标组件 - 支持 Arco Design 图标和 @tabler/icons-vue
|
||||
const getIconComponent = (iconName: string) => {
|
||||
if (!iconName) return null
|
||||
|
||||
|
||||
// 检查是否是 Tabler 图标(不以 'icon-' 开头)
|
||||
if (!iconName.startsWith('icon-')) {
|
||||
const IconComponent = COMMON_ICONS[iconName]
|
||||
@@ -115,7 +109,7 @@ export default defineComponent({
|
||||
return () => h(IconComponent, { size: 18 })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 回退到 Arco Design 图标
|
||||
return () => h(compile(`<${iconName}/>`))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user