fix: custom icon not support class #351
parent
87ad915520
commit
707e1a44ea
|
@ -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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue