mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 04:58:16 +08:00
29 lines
689 B
Vue
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>
|
|
);
|
|
},
|
|
};
|