mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 21:18:14 +08:00
75cf264040
* refactor: tabs * refactor: tabs * fix: tabs hotreload error * refactor: rename useRef * feat: add leftExtra rightExtra * refactor: tabs * test: update tabs test * refactor: card * doc: update tabs demo * refactor: add card style * style: update vue dep
24 lines
649 B
Vue
24 lines
649 B
Vue
import { defineComponent, computed } from 'vue';
|
|
import useConfigInject from '../_util/hooks/useConfigInject';
|
|
|
|
export default defineComponent({
|
|
name: 'ACardGrid',
|
|
__ANT_CARD_GRID: true,
|
|
props: {
|
|
prefixCls: String,
|
|
hoverable: { type: Boolean, default: true },
|
|
},
|
|
setup(props, { slots }) {
|
|
const { prefixCls } = useConfigInject('card', props);
|
|
const classNames = computed(() => {
|
|
return {
|
|
[`${prefixCls.value}-grid`]: true,
|
|
[`${prefixCls.value}-grid-hoverable`]: props.hoverable,
|
|
};
|
|
});
|
|
return () => {
|
|
return <div class={classNames.value}>{slots.default?.()}</div>;
|
|
};
|
|
},
|
|
});
|