2020-12-18 10:02:51 +00:00
|
|
|
import PreviewGroup from '../vc-image/src/PreviewGroup';
|
2022-03-12 01:56:32 +00:00
|
|
|
import { computed, defineComponent } from 'vue';
|
|
|
|
import useConfigInject from '../_util/hooks/useConfigInject';
|
2020-12-18 10:02:51 +00:00
|
|
|
|
|
|
|
const InternalPreviewGroup = defineComponent({
|
|
|
|
name: 'AImagePreviewGroup',
|
|
|
|
inheritAttrs: false,
|
2022-03-26 14:52:54 +00:00
|
|
|
props: { previewPrefixCls: String },
|
2020-12-18 10:02:51 +00:00
|
|
|
setup(props, { attrs, slots }) {
|
2022-03-12 01:56:32 +00:00
|
|
|
const { getPrefixCls } = useConfigInject('image', props);
|
|
|
|
const prefixCls = computed(() => getPrefixCls('image-preview', props.previewPrefixCls));
|
2020-12-18 10:02:51 +00:00
|
|
|
return () => {
|
|
|
|
return (
|
|
|
|
<PreviewGroup
|
|
|
|
{...{ ...attrs, ...props }}
|
2021-06-19 14:13:13 +00:00
|
|
|
previewPrefixCls={prefixCls.value}
|
2020-12-18 10:02:51 +00:00
|
|
|
v-slots={slots}
|
|
|
|
></PreviewGroup>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
|
|
|
export default InternalPreviewGroup;
|