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

38 lines
762 B
React
Raw Normal View History

import { filterEmpty } from '../_util/props-util'
2017-12-06 10:54:20 +00:00
export default {
name: 'InputGruop',
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 01:43:31 +00:00
render () {
return (
<span class={this.classes} >
{filterEmpty(this.$slots.default)}
2018-03-19 01:43:31 +00:00
</span>
)
},
2017-12-06 10:54:20 +00:00
}
2018-03-19 02:16:27 +00:00