2018-03-20 11:06:04 +00:00
|
|
|
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} >
|
2018-03-20 11:06:04 +00:00
|
|
|
{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
|
|
|
|