ant-design-vue/components/input/Group.jsx

38 lines
763 B
React
Raw Normal View History

import { filterEmpty } from '../_util/props-util'
2017-12-06 18:54:20 +08:00
export default {
2018-04-08 21:17:20 +08:00
name: 'AInputGroup',
2017-12-06 18:54:20 +08:00
props: {
prefixCls: {
default: 'ant-input-group',
type: String,
},
size: {
validator (value) {
return ['small', 'large', 'default'].includes(value)
},
},
compact: Boolean,
},
computed: {
classes () {
const { prefixCls, size, compact = false } = this
return {
[`${prefixCls}`]: true,
[`${prefixCls}-lg`]: size === 'large',
[`${prefixCls}-sm`]: size === 'small',
[`${prefixCls}-compact`]: compact,
}
},
},
methods: {
},
2018-03-19 09:43:31 +08:00
render () {
return (
<span class={this.classes} >
{filterEmpty(this.$slots.default)}
2018-03-19 09:43:31 +08:00
</span>
)
},
2017-12-06 18:54:20 +08:00
}
2018-03-19 10:16:27 +08:00