diff --git a/src/components/ReIcon/src/hooks.ts b/src/components/ReIcon/src/hooks.ts index 6fc355b9d..6bc0142af 100644 --- a/src/components/ReIcon/src/hooks.ts +++ b/src/components/ReIcon/src/hooks.ts @@ -33,7 +33,7 @@ export function useRenderIcon(icon: any, attrs?: iconType): Component { }); } else if (typeof icon === "function" || typeof icon?.render === "function") { // svg - return h(icon, { ...attrs }); + return attrs ? h(icon, { ...attrs }) : icon; } else if (typeof icon === "object") { return defineComponent({ name: "OfflineIcon",