feat: 封装renderIcon方法
This commit is contained in:
parent
b2cf78b36d
commit
a6f86ee315
6
src/utils/icon.js
Normal file
6
src/utils/icon.js
Normal file
@ -0,0 +1,6 @@
|
||||
import { h } from 'vue'
|
||||
import { NIcon } from 'naive-ui'
|
||||
|
||||
export function renderIcon(icon, props = { size: 12 }) {
|
||||
return () => h(NIcon, { ...props }, { default: () => h(icon) })
|
||||
}
|
Loading…
Reference in New Issue
Block a user