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

38 lines
700 B
React
Raw Normal View History

2018-03-19 02:16:27 +00:00
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} >
{this.$slots.default}
</span>
)
},
2017-12-06 10:54:20 +00:00
}
2018-03-19 02:16:27 +00:00