You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/input/Group.jsx

37 lines
818 B

import { filterEmpty } from '../_util/props-util';
7 years ago
export default {
name: 'AInputGroup',
7 years ago
props: {
prefixCls: {
default: 'ant-input-group',
type: String,
},
size: {
validator(value) {
return ['small', 'large', 'default'].includes(value);
7 years ago
},
},
compact: Boolean,
},
computed: {
classes() {
const { prefixCls, size, compact = false } = this;
7 years ago
return {
[`${prefixCls}`]: true,
[`${prefixCls}-lg`]: size === 'large',
[`${prefixCls}-sm`]: size === 'small',
[`${prefixCls}-compact`]: compact,
};
7 years ago
},
},
methods: {},
render() {
const { $listeners } = this;
return (
<span class={this.classes} {...{ on: $listeners }}>
{filterEmpty(this.$slots.default)}
</span>
);
},
};