mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2025-12-28 04:00:22 +08:00
13 lines
412 B
JavaScript
13 lines
412 B
JavaScript
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 }) })
|
|
}
|