Skip to content

Commit 3c05b77

Browse files
authored
fix(ImageGroup):fix open imagegroup without animation (#6898)
1 parent 1254677 commit 3c05b77

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

components/image/PreviewGroup.tsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import CloseOutlined from '@ant-design/icons-vue/CloseOutlined';
1212
import LeftOutlined from '@ant-design/icons-vue/LeftOutlined';
1313
import RightOutlined from '@ant-design/icons-vue/RightOutlined';
1414
import SwapOutlined from '@ant-design/icons-vue/SwapOutlined';
15+
import { getTransitionName } from '../_util/transition';
1516
import useStyle from './style';
1617
import { anyType } from '../_util/type';
1718

@@ -38,7 +39,7 @@ const InternalPreviewGroup = defineComponent({
3839
inheritAttrs: false,
3940
props: previewGroupProps(),
4041
setup(props, { attrs, slots }) {
41-
const { prefixCls } = useConfigInject('image', props);
42+
const { prefixCls, rootPrefixCls } = useConfigInject('image', props);
4243
const previewPrefixCls = computed(() => `${prefixCls.value}-preview`);
4344
const [wrapSSR, hashId] = useStyle(prefixCls);
4445
const mergedPreview = computed(() => {
@@ -51,6 +52,12 @@ const InternalPreviewGroup = defineComponent({
5152
return {
5253
..._preview,
5354
rootClassName: hashId.value,
55+
transitionName: getTransitionName(rootPrefixCls.value, 'zoom', _preview.transitionName),
56+
maskTransitionName: getTransitionName(
57+
rootPrefixCls.value,
58+
'fade',
59+
_preview.maskTransitionName,
60+
),
5461
};
5562
});
5663
return () => {

0 commit comments

Comments
 (0)