Skip to content

fix(ImageGroup):fix open imagegroup without animation 🍅 #6898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion components/image/PreviewGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import CloseOutlined from '@ant-design/icons-vue/CloseOutlined';
import LeftOutlined from '@ant-design/icons-vue/LeftOutlined';
import RightOutlined from '@ant-design/icons-vue/RightOutlined';
import SwapOutlined from '@ant-design/icons-vue/SwapOutlined';
import { getTransitionName } from '../_util/transition';
import useStyle from './style';
import { anyType } from '../_util/type';

Expand All @@ -38,7 +39,7 @@ const InternalPreviewGroup = defineComponent({
inheritAttrs: false,
props: previewGroupProps(),
setup(props, { attrs, slots }) {
const { prefixCls } = useConfigInject('image', props);
const { prefixCls, rootPrefixCls } = useConfigInject('image', props);
const previewPrefixCls = computed(() => `${prefixCls.value}-preview`);
const [wrapSSR, hashId] = useStyle(prefixCls);
const mergedPreview = computed(() => {
Expand All @@ -51,6 +52,12 @@ const InternalPreviewGroup = defineComponent({
return {
..._preview,
rootClassName: hashId.value,
transitionName: getTransitionName(rootPrefixCls.value, 'zoom', _preview.transitionName),
maskTransitionName: getTransitionName(
rootPrefixCls.value,
'fade',
_preview.maskTransitionName,
),
};
});
return () => {
Expand Down