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/image/PreviewGroup.tsx

27 lines
851 B

import PreviewGroup from '../vc-image/src/PreviewGroup';
import { computed, defineComponent, inject } from 'vue';
import { defaultConfigProvider } from '../config-provider';
import PropTypes from '../_util/vue-types';
const InternalPreviewGroup = defineComponent({
name: 'AImagePreviewGroup',
inheritAttrs: false,
props: { previewPrefixCls: PropTypes.string },
setup(props, { attrs, slots }) {
const configProvider = inject('configProvider', defaultConfigProvider);
const prefixCls = computed(() =>
configProvider.getPrefixCls('image-preview', props.previewPrefixCls),
);
return () => {
return (
<PreviewGroup
{...{ ...attrs, ...props }}
previewPrefixCls={prefixCls.value}
v-slots={slots}
></PreviewGroup>
);
};
},
});
export default InternalPreviewGroup;