Skip to content

Commit 707e1a4

Browse files
committed
fix: custom icon not support class #351
1 parent 87ad915 commit 707e1a4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

components/icon/IconFont.jsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ export default function create (options) {
2626
const Iconfont = {
2727
functional: true,
2828
name: 'AIconfont',
29+
props: Icon.props,
2930
render (h, context) {
30-
const { props, slots, listeners } = context
31+
const { props, slots, listeners, data } = context
3132
const { type, ...restProps } = props
3233
const slotsMap = slots()
3334
const children = slotsMap.default
@@ -40,9 +41,7 @@ export default function create (options) {
4041
content = children
4142
}
4243
return (
43-
<Icon
44-
{...{ props: restProps, on: listeners }}
45-
>
44+
<Icon {...{ ...data, props: restProps, on: listeners }}>
4645
{content}
4746
</Icon>
4847

0 commit comments

Comments
 (0)