Skip to content

Commit

Permalink
fix: custom icon not support class #351
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Dec 28, 2018
1 parent 87ad915 commit 707e1a4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions components/icon/IconFont.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ export default function create (options) {
const Iconfont = {
functional: true,
name: 'AIconfont',
props: Icon.props,
render (h, context) {
const { props, slots, listeners } = context
const { props, slots, listeners, data } = context
const { type, ...restProps } = props
const slotsMap = slots()
const children = slotsMap.default
Expand All @@ -40,9 +41,7 @@ export default function create (options) {
content = children
}
return (
<Icon
{...{ props: restProps, on: listeners }}
>
<Icon {...{ ...data, props: restProps, on: listeners }}>
{content}
</Icon>

Expand Down

0 comments on commit 707e1a4

Please sign in to comment.