mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
perf: 增强useRenderIcon
使用本地svg
的方式
This commit is contained in:
parent
ba1f655b6e
commit
246da7c872
@ -33,7 +33,7 @@ export function useRenderIcon(icon: any, attrs?: iconType): Component {
|
|||||||
});
|
});
|
||||||
} else if (typeof icon === "function" || typeof icon?.render === "function") {
|
} else if (typeof icon === "function" || typeof icon?.render === "function") {
|
||||||
// svg
|
// svg
|
||||||
return h(icon, { ...attrs });
|
return attrs ? h(icon, { ...attrs }) : icon;
|
||||||
} else if (typeof icon === "object") {
|
} else if (typeof icon === "object") {
|
||||||
return defineComponent({
|
return defineComponent({
|
||||||
name: "OfflineIcon",
|
name: "OfflineIcon",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user