File tree 2 files changed +13
-5
lines changed
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export default defineComponent({
56
56
} ,
57
57
} ,
58
58
methods : {
59
- handleVisibleChange ( visible ) {
59
+ handleVisibleChange ( visible : boolean ) {
60
60
if ( ! hasProp ( this , 'visible' ) ) {
61
61
this . sVisible = this . isNoTitle ( ) ? false : visible ;
62
62
}
@@ -85,7 +85,7 @@ export default defineComponent({
85
85
// Fix Tooltip won't hide at disabled button
86
86
// mouse events don't trigger at disabled button in Chrome
87
87
// https://github.com/react-component/tooltip/issues/18
88
- getDisabledCompatibleChildren ( ele ) {
88
+ getDisabledCompatibleChildren ( ele : any ) {
89
89
if (
90
90
( ( typeof ele . type === 'object' &&
91
91
( ele . type . __ANT_BUTTON === true ||
@@ -143,7 +143,7 @@ export default defineComponent({
143
143
} ,
144
144
145
145
// 动态设置动画点
146
- onPopupAlign ( domNode , align ) {
146
+ onPopupAlign ( domNode : HTMLElement , align : any ) {
147
147
const placements = this . getPlacements ( ) ;
148
148
// 当前返回的位置
149
149
const placement = Object . keys ( placements ) . filter (
Original file line number Diff line number Diff line change @@ -12,7 +12,15 @@ const autoAdjustOverflowDisabled = {
12
12
13
13
const targetOffset = [ 0 , 0 ] ;
14
14
15
- export function getOverflowOptions ( autoAdjustOverflow ) {
15
+ interface PlacementsConfig {
16
+ arrowPointAtCenter : boolean ;
17
+ arrowWidth ?: number ;
18
+ verticalArrowShift ?: number ;
19
+ horizontalArrowShift ?: number ;
20
+ autoAdjustOverflow ?: boolean | Object ;
21
+ }
22
+
23
+ export function getOverflowOptions ( autoAdjustOverflow : boolean | Object ) {
16
24
if ( typeof autoAdjustOverflow === 'boolean' ) {
17
25
return autoAdjustOverflow ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled ;
18
26
}
@@ -22,7 +30,7 @@ export function getOverflowOptions(autoAdjustOverflow) {
22
30
} ;
23
31
}
24
32
25
- export default function getPlacements ( config ) {
33
+ export default function getPlacements ( config : PlacementsConfig ) {
26
34
const {
27
35
arrowWidth = 5 ,
28
36
horizontalArrowShift = 16 ,
You can’t perform that action at this time.
0 commit comments