diff --git a/src/utils/icon.js b/src/utils/icon.js new file mode 100644 index 0000000..fd71103 --- /dev/null +++ b/src/utils/icon.js @@ -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) }) +}