2020-12-18 18:02:51 +08:00
|
|
|
import PreviewGroup from '../vc-image/src/PreviewGroup';
|
2021-06-19 22:13:13 +08:00
|
|
|
import { computed, defineComponent, inject } from 'vue';
|
2020-12-18 18:02:51 +08:00
|
|
|
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);
|
2021-06-19 22:13:13 +08:00
|
|
|
const prefixCls = computed(() =>
|
|
|
|
configProvider.getPrefixCls('image-preview', props.previewPrefixCls),
|
|
|
|
);
|
2020-12-18 18:02:51 +08:00
|
|
|
return () => {
|
|
|
|
return (
|
|
|
|
<PreviewGroup
|
|
|
|
{...{ ...attrs, ...props }}
|
2021-06-19 22:13:13 +08:00
|
|
|
previewPrefixCls={prefixCls.value}
|
2020-12-18 18:02:51 +08:00
|
|
|
v-slots={slots}
|
|
|
|
></PreviewGroup>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
|
|
|
export default InternalPreviewGroup;
|