mod: 修改侧边菜单渲染菜单使用封装的renderIcon方法

This commit is contained in:
张传龙 2022-04-23 19:10:55 +08:00
parent a6f86ee315
commit bf63fb5ab7

View File

@ -12,14 +12,14 @@
<script setup>
import { useRouter } from 'vue-router'
import { computed, h } from 'vue'
import { computed } from 'vue'
import { usePermissionStore } from '@/store/modules/permission'
import { NIcon } from 'naive-ui'
import { IconCircle, IconMenu } from '@/components/AppIcons'
import { isExternal } from '@/utils/is'
import { useAppStore } from '@/store/modules/app'
import { renderIcon } from '@/utils/icon'
const router = useRouter()
const permissionStore = usePermissionStore()
@ -41,10 +41,6 @@ function resolvePath(basePath, path) {
)
}
function renderIcon(icon, props = { size: 12 }) {
return () => h(NIcon, { ...props }, { default: () => h(icon) })
}
function isSingleRoute(route) {
let isSingle = true
let curRoute = route