ant-design-vue/components/card/Grid.jsx
2019-09-11 22:51:52 +08:00

29 lines
689 B
Vue

import PropTypes from '../_util/vue-types';
import { ConfigConsumerProps } from '../config-provider';
export default {
name: 'ACardGrid',
__ANT_CARD_GRID: true,
props: {
prefixCls: PropTypes.string,
},
inject: {
configProvider: { default: () => ConfigConsumerProps },
},
render() {
const { prefixCls: customizePrefixCls } = this.$props;
const getPrefixCls = this.configProvider.getPrefixCls;
const prefixCls = getPrefixCls('card', customizePrefixCls);
const classString = {
[`${prefixCls}-grid`]: true,
};
return (
<div {...{ on: this.$listeners }} class={classString}>
{this.$slots.default}
</div>
);
},
};