refactor: 重构图标使用方式,集成自定应图标
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { h } from 'vue'
|
||||
import { Icon } from '@iconify/vue'
|
||||
import { NIcon } from 'naive-ui'
|
||||
|
||||
export function renderIcon(icon, props = { size: 12 }) {
|
||||
return () => h(NIcon, { ...props }, { default: () => h(icon) })
|
||||
return () => h(NIcon, props, { default: () => h(Icon, { icon }) })
|
||||
}
|
||||
|
Reference in New Issue
Block a user