mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 13:08:48 +08:00
38 lines
763 B
JavaScript
38 lines
763 B
JavaScript
import { filterEmpty } from '../_util/props-util'
|
|
export default {
|
|
name: 'AInputGroup',
|
|
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: {
|
|
},
|
|
render () {
|
|
return (
|
|
<span class={this.classes} >
|
|
{filterEmpty(this.$slots.default)}
|
|
</span>
|
|
)
|
|
},
|
|
}
|
|
|