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';
19
19
import { getTransitionName } from '../_util/transition' ;
20
20
import { cloneVNodes } from '../_util/vnode' ;
21
21
import omit from '../_util/omit' ;
22
+ import { tooltipDefaultProps } from '../tooltip/Tooltip' ;
22
23
23
24
export const popconfirmProps = ( ) => ( {
24
25
...abstractTooltipProps ( ) ,
@@ -47,6 +48,7 @@ export interface PopconfirmLocale {
47
48
const Popconfirm = defineComponent ( {
48
49
name : 'APopconfirm' ,
49
50
props : initDefaultProps ( popconfirmProps ( ) , {
51
+ ...tooltipDefaultProps ,
50
52
trigger : 'click' ,
51
53
transitionName : 'zoom-big' ,
52
54
align : ( ) => ( { } ) ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { withInstall } from '../_util/type';
8
8
import useConfigInject from '../_util/hooks/useConfigInject' ;
9
9
import omit from '../_util/omit' ;
10
10
import { getTransitionName } from '../_util/transition' ;
11
+ import { tooltipDefaultProps } from '../tooltip/Tooltip' ;
11
12
12
13
export const popoverProps = ( ) => ( {
13
14
...abstractTooltipProps ( ) ,
@@ -20,6 +21,7 @@ export type PopoverProps = Partial<ExtractPropTypes<ReturnType<typeof popoverPro
20
21
const Popover = defineComponent ( {
21
22
name : 'APopover' ,
22
23
props : initDefaultProps ( popoverProps ( ) , {
24
+ ...tooltipDefaultProps ,
23
25
trigger : 'hover' ,
24
26
transitionName : 'zoom-big' ,
25
27
placement : 'top' ,
Original file line number Diff line number Diff line change @@ -47,6 +47,17 @@ export const tooltipProps = () => ({
47
47
title : PropTypes . any ,
48
48
} ) ;
49
49
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
+
50
61
export type TriggerTypes = typeof triggerTypes [ number ] ;
51
62
52
63
export type PlacementTypes = typeof placementTypes [ number ] ;
You can’t perform that action at this time.
0 commit comments