perf: reduce the number of icon component instances
This commit is contained in:
9
packages/@core/shared/iconify/src/create-icon.ts
Normal file
9
packages/@core/shared/iconify/src/create-icon.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { h } from 'vue';
|
||||
|
||||
import { Icon } from '@iconify/vue';
|
||||
|
||||
function createIcon(icon: string) {
|
||||
return h(Icon, { icon });
|
||||
}
|
||||
|
||||
export { createIcon };
|
Reference in New Issue
Block a user