diff --git a/src/icon/index.js b/src/icon/index.js
index a7520a223..84b2141e0 100644
--- a/src/icon/index.js
+++ b/src/icon/index.js
@@ -24,25 +24,24 @@ export default createComponent({
},
},
- render() {
- const { name } = this;
- const imageIcon = isImage(name);
+ setup(props, { slots }) {
+ return () => {
+ const { tag, dot, name, size, badge, color, classPrefix } = props;
+ const isImageIcon = isImage(name);
- return (
-
- {this.$slots.default?.()}
- {imageIcon &&
}
-
-
- );
+ return (
+
+ {slots.default?.()}
+ {isImageIcon &&
}
+
+
+ );
+ };
},
});