1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2026-04-26 04:04:08 +08:00

refactor: folders

This commit is contained in:
张传龙
2022-09-18 20:05:40 +08:00
parent bdbe9b8483
commit 6664ae8f7b
45 changed files with 138 additions and 139 deletions

12
src/utils/common/icon.js Normal file
View File

@@ -0,0 +1,12 @@
import { h } from 'vue'
import { Icon } from '@iconify/vue'
import { NIcon } from 'naive-ui'
import SvgIcon from '@/components/icon/SvgIcon.vue'
export function renderIcon(icon, props = { size: 12 }) {
return () => h(NIcon, props, { default: () => h(Icon, { icon }) })
}
export function renderCustomIcon(icon, props = { size: 12 }) {
return () => h(NIcon, props, { default: () => h(SvgIcon, { icon }) })
}