perf: reduce the number of icon component instances

This commit is contained in:
vben
2024-07-06 21:53:02 +08:00
parent f7a93a9bb3
commit 3571511394
10 changed files with 19 additions and 24 deletions

View File

@@ -0,0 +1,9 @@
import { h } from 'vue';
import { Icon } from '@iconify/vue';
function createIcon(icon: string) {
return h(Icon, { icon });
}
export { createIcon };