File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import classNames from '../_util/classNames';
1919import { getTransitionName } from '../_util/transition' ;
2020import { cloneVNodes } from '../_util/vnode' ;
2121import omit from '../_util/omit' ;
22+ import { tooltipDefaultProps } from '../tooltip/Tooltip' ;
2223
2324export const popconfirmProps = ( ) => ( {
2425 ...abstractTooltipProps ( ) ,
@@ -47,6 +48,7 @@ export interface PopconfirmLocale {
4748const Popconfirm = defineComponent ( {
4849 name : 'APopconfirm' ,
4950 props : initDefaultProps ( popconfirmProps ( ) , {
51+ ...tooltipDefaultProps ,
5052 trigger : 'click' ,
5153 transitionName : 'zoom-big' ,
5254 align : ( ) => ( { } ) ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { withInstall } from '../_util/type';
88import useConfigInject from '../_util/hooks/useConfigInject' ;
99import omit from '../_util/omit' ;
1010import { getTransitionName } from '../_util/transition' ;
11+ import { tooltipDefaultProps } from '../tooltip/Tooltip' ;
1112
1213export const popoverProps = ( ) => ( {
1314 ...abstractTooltipProps ( ) ,
@@ -20,6 +21,7 @@ export type PopoverProps = Partial<ExtractPropTypes<ReturnType<typeof popoverPro
2021const Popover = defineComponent ( {
2122 name : 'APopover' ,
2223 props : initDefaultProps ( popoverProps ( ) , {
24+ ...tooltipDefaultProps ,
2325 trigger : 'hover' ,
2426 transitionName : 'zoom-big' ,
2527 placement : 'top' ,
Original file line number Diff line number Diff line change @@ -47,6 +47,17 @@ export const tooltipProps = () => ({
4747 title : PropTypes . any ,
4848} ) ;
4949
50+ export const tooltipDefaultProps = {
51+ trigger : 'hover' ,
52+ transitionName : 'zoom-big-fast' ,
53+ align : ( ) => ( { } ) ,
54+ placement : 'top' ,
55+ mouseEnterDelay : 0.1 ,
56+ mouseLeaveDelay : 0.1 ,
57+ arrowPointAtCenter : false ,
58+ autoAdjustOverflow : true ,
59+ } ;
60+
5061export type TriggerTypes = typeof triggerTypes [ number ] ;
5162
5263export type PlacementTypes = typeof placementTypes [ number ] ;
You can’t perform that action at this time.
0 commit comments