fix: motion not work

This commit is contained in:
tangjinzhou 2023-03-16 14:41:44 +08:00
parent 5cc85f3cc1
commit d95861aa90
4 changed files with 10 additions and 7 deletions

View File

@ -157,8 +157,6 @@ export default defineComponent({
inheritAttrs: false,
props: initDefaultProps(modalProps(), {
width: 520,
transitionName: 'zoom',
maskTransitionName: 'fade',
confirmLoading: false,
okType: 'primary',
}),

View File

@ -55,7 +55,6 @@ const Popconfirm = defineComponent({
props: initDefaultProps(popconfirmProps(), {
...tooltipDefaultProps(),
trigger: 'click',
transitionName: 'zoom-big',
placement: 'top',
mouseEnterDelay: 0.1,
mouseLeaveDelay: 0.1,

View File

@ -27,7 +27,6 @@ const Popover = defineComponent({
props: initDefaultProps(popoverProps(), {
...tooltipDefaultProps(),
trigger: 'hover',
transitionName: 'zoom-big',
placement: 'top',
mouseEnterDelay: 0.1,
mouseLeaveDelay: 0.1,

View File

@ -21,6 +21,7 @@ import raf from '../_util/raf';
import { parseColor } from './util';
export type { AdjustOverflow, PlacementsConfig } from '../_util/placements';
import useStyle from './style';
import { getTransitionName } from '../_util/transition';
// https://github.com/react-component/tooltip
// https://github.com/yiminghe/dom-align
@ -55,7 +56,6 @@ export const tooltipProps = () => ({
export const tooltipDefaultProps = () => ({
trigger: 'hover',
transitionName: 'zoom-big-fast',
align: {},
placement: 'top',
mouseEnterDelay: 0.1,
@ -72,7 +72,6 @@ export default defineComponent({
inheritAttrs: false,
props: initDefaultProps(tooltipProps(), {
trigger: 'hover',
transitionName: 'zoom-big-fast',
align: {},
placement: 'top',
mouseEnterDelay: 0.1,
@ -96,7 +95,10 @@ export default defineComponent({
});
}
const { prefixCls, getPopupContainer, direction } = useConfigInject('tooltip', props);
const { prefixCls, getPopupContainer, direction, rootPrefixCls } = useConfigInject(
'tooltip',
props,
);
const mergedOpen = computed(() => props.open ?? props.visible);
const innerOpen = ref(firstNotUndefined([props.open, props.visible]));
@ -284,6 +286,11 @@ export default defineComponent({
overlayInnerStyle: formattedOverlayInnerStyle,
onVisibleChange: handleVisibleChange,
onPopupAlign,
transitionName: getTransitionName(
rootPrefixCls.value,
'zoom-big-fast',
props.transitionName,
),
};
return wrapSSR(
<VcTooltip