fix: custom icon not support class #351

pull/359/head
tangjinzhou 2018-12-28 12:15:22 +08:00
parent 87ad915520
commit 707e1a44ea
1 changed files with 3 additions and 4 deletions

View File

@ -26,8 +26,9 @@ export default function create (options) {
const Iconfont = { const Iconfont = {
functional: true, functional: true,
name: 'AIconfont', name: 'AIconfont',
props: Icon.props,
render (h, context) { render (h, context) {
const { props, slots, listeners } = context const { props, slots, listeners, data } = context
const { type, ...restProps } = props const { type, ...restProps } = props
const slotsMap = slots() const slotsMap = slots()
const children = slotsMap.default const children = slotsMap.default
@ -40,9 +41,7 @@ export default function create (options) {
content = children content = children
} }
return ( return (
<Icon <Icon {...{ ...data, props: restProps, on: listeners }}>
{...{ props: restProps, on: listeners }}
>
{content} {content}
</Icon> </Icon>