feat: flex

This commit is contained in:
FairyEver 2021-10-25 10:51:43 +08:00
parent d1cd0f35c6
commit 1cf501a4f0
1 changed files with 15 additions and 4 deletions

View File

@ -62,10 +62,21 @@ export default defineComponent({
flexGrow: props.grow,
flexShrink: props.shrink
}, value => !isUndefined(value)))
return () => (
<props.tag class={ unref(classnames) } style={ unref(style) }>
{ slots.default?.() }
</props.tag>
return {
classnames,
style
}
},
render () {
const {
classnames,
style
} = this
const Tag = this.tag
return (
<Tag class={ classnames } style={ style }>
{ this.$slots?.default?.() }
</Tag>
)
}
})