diff --git a/components/popconfirm/index.tsx b/components/popconfirm/index.tsx index 5778d9a35..1abd400bd 100644 --- a/components/popconfirm/index.tsx +++ b/components/popconfirm/index.tsx @@ -19,6 +19,7 @@ import classNames from '../_util/classNames'; import { getTransitionName } from '../_util/transition'; import { cloneVNodes } from '../_util/vnode'; import omit from '../_util/omit'; +import { tooltipDefaultProps } from '../tooltip/Tooltip'; export const popconfirmProps = () => ({ ...abstractTooltipProps(), @@ -47,6 +48,7 @@ export interface PopconfirmLocale { const Popconfirm = defineComponent({ name: 'APopconfirm', props: initDefaultProps(popconfirmProps(), { + ...tooltipDefaultProps, trigger: 'click', transitionName: 'zoom-big', align: () => ({}), diff --git a/components/popover/index.tsx b/components/popover/index.tsx index 54c406be5..7025ea7e7 100644 --- a/components/popover/index.tsx +++ b/components/popover/index.tsx @@ -8,6 +8,7 @@ import { withInstall } from '../_util/type'; import useConfigInject from '../_util/hooks/useConfigInject'; import omit from '../_util/omit'; import { getTransitionName } from '../_util/transition'; +import { tooltipDefaultProps } from '../tooltip/Tooltip'; export const popoverProps = () => ({ ...abstractTooltipProps(), @@ -20,6 +21,7 @@ export type PopoverProps = Partial ({ title: PropTypes.any, }); +export const tooltipDefaultProps = { + trigger: 'hover', + transitionName: 'zoom-big-fast', + align: () => ({}), + placement: 'top', + mouseEnterDelay: 0.1, + mouseLeaveDelay: 0.1, + arrowPointAtCenter: false, + autoAdjustOverflow: true, +}; + export type TriggerTypes = typeof triggerTypes[number]; export type PlacementTypes = typeof placementTypes[number];