Skip to content

Commit d95861a

Browse files
committed
fix: motion not work
1 parent 5cc85f3 commit d95861a

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

components/modal/Modal.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ export default defineComponent({
157157
inheritAttrs: false,
158158
props: initDefaultProps(modalProps(), {
159159
width: 520,
160-
transitionName: 'zoom',
161-
maskTransitionName: 'fade',
162160
confirmLoading: false,
163161
okType: 'primary',
164162
}),

components/popconfirm/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ const Popconfirm = defineComponent({
5555
props: initDefaultProps(popconfirmProps(), {
5656
...tooltipDefaultProps(),
5757
trigger: 'click',
58-
transitionName: 'zoom-big',
5958
placement: 'top',
6059
mouseEnterDelay: 0.1,
6160
mouseLeaveDelay: 0.1,

components/popover/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const Popover = defineComponent({
2727
props: initDefaultProps(popoverProps(), {
2828
...tooltipDefaultProps(),
2929
trigger: 'hover',
30-
transitionName: 'zoom-big',
3130
placement: 'top',
3231
mouseEnterDelay: 0.1,
3332
mouseLeaveDelay: 0.1,

components/tooltip/Tooltip.tsx

+10-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import raf from '../_util/raf';
2121
import { parseColor } from './util';
2222
export type { AdjustOverflow, PlacementsConfig } from '../_util/placements';
2323
import useStyle from './style';
24+
import { getTransitionName } from '../_util/transition';
2425

2526
// https://github.com/react-component/tooltip
2627
// https://github.com/yiminghe/dom-align
@@ -55,7 +56,6 @@ export const tooltipProps = () => ({
5556

5657
export const tooltipDefaultProps = () => ({
5758
trigger: 'hover',
58-
transitionName: 'zoom-big-fast',
5959
align: {},
6060
placement: 'top',
6161
mouseEnterDelay: 0.1,
@@ -72,7 +72,6 @@ export default defineComponent({
7272
inheritAttrs: false,
7373
props: initDefaultProps(tooltipProps(), {
7474
trigger: 'hover',
75-
transitionName: 'zoom-big-fast',
7675
align: {},
7776
placement: 'top',
7877
mouseEnterDelay: 0.1,
@@ -96,7 +95,10 @@ export default defineComponent({
9695
});
9796
}
9897

99-
const { prefixCls, getPopupContainer, direction } = useConfigInject('tooltip', props);
98+
const { prefixCls, getPopupContainer, direction, rootPrefixCls } = useConfigInject(
99+
'tooltip',
100+
props,
101+
);
100102
const mergedOpen = computed(() => props.open ?? props.visible);
101103
const innerOpen = ref(firstNotUndefined([props.open, props.visible]));
102104

@@ -284,6 +286,11 @@ export default defineComponent({
284286
overlayInnerStyle: formattedOverlayInnerStyle,
285287
onVisibleChange: handleVisibleChange,
286288
onPopupAlign,
289+
transitionName: getTransitionName(
290+
rootPrefixCls.value,
291+
'zoom-big-fast',
292+
props.transitionName,
293+
),
287294
};
288295
return wrapSSR(
289296
<VcTooltip

0 commit comments

Comments
 (0)