feat: 配合unplugin-icons集成iconify图标解决方案
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="logo">
|
||||
<n-icon size="36" color="#316c72">
|
||||
<LastfmSquare />
|
||||
<IconLogo />
|
||||
</n-icon>
|
||||
<router-link to="/">
|
||||
<n-gradient-text type="primary">{{ title }}</n-gradient-text>
|
||||
@@ -10,7 +10,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { LastfmSquare } from '@vicons/fa'
|
||||
import { IconLogo } from '@/components/AppIcons'
|
||||
const title = import.meta.env.VITE_APP_TITLE
|
||||
</script>
|
||||
|
||||
|
@@ -16,7 +16,7 @@ import { computed, h } from 'vue'
|
||||
import { usePermissionStore } from '@/store/modules/permission'
|
||||
|
||||
import { NIcon } from 'naive-ui'
|
||||
import { ListAlt, CircleRegular } from '@vicons/fa'
|
||||
import { IconCircle, IconMenu } from '@/components/AppIcons'
|
||||
|
||||
import { isExternal } from '@/utils/is'
|
||||
|
||||
@@ -68,10 +68,10 @@ function generateOptions(routes, basePath) {
|
||||
path: resolvePath(basePath, route.path),
|
||||
}
|
||||
if (route.children && route.children.length) {
|
||||
curOption.icon = renderIcon(route.meta?.icon || ListAlt, { size: 16 })
|
||||
curOption.icon = renderIcon(route.meta?.icon || IconMenu, { size: 16 })
|
||||
curOption.children = generateOptions(route.children, resolvePath(basePath, route.path))
|
||||
} else {
|
||||
curOption.icon = (route.meta?.icon && renderIcon(route.meta?.icon)) || renderIcon(CircleRegular, { size: 8 })
|
||||
curOption.icon = (route.meta?.icon && renderIcon(route.meta?.icon)) || renderIcon(IconCircle, { size: 8 })
|
||||
}
|
||||
options.push(curOption)
|
||||
}
|
||||
|
Reference in New Issue
Block a user