admin-vben5/packages/@core/base/icons/src/create-icon.ts
Vben 3c17f4e9f8
perf: all icons used in the core are offline (#4173)
* perf: all icons used in the core are offline

* chore: update default icon

* chore: update shadow
2024-08-17 21:11:07 +08:00

15 lines
311 B
TypeScript

import { defineComponent, h } from 'vue';
import { Icon } from '@iconify/vue';
function createIconifyIcon(icon: string) {
return defineComponent({
name: `Icon-${icon}`,
setup(props, { attrs }) {
return () => h(Icon, { icon, ...props, ...attrs });
},
});
}
export { createIconifyIcon };