File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export default defineComponent({
5656 } ,
5757 } ,
5858 methods : {
59- handleVisibleChange ( visible ) {
59+ handleVisibleChange ( visible : boolean ) {
6060 if ( ! hasProp ( this , 'visible' ) ) {
6161 this . sVisible = this . isNoTitle ( ) ? false : visible ;
6262 }
@@ -85,7 +85,7 @@ export default defineComponent({
8585 // Fix Tooltip won't hide at disabled button
8686 // mouse events don't trigger at disabled button in Chrome
8787 // https://github.com/react-component/tooltip/issues/18
88- getDisabledCompatibleChildren ( ele ) {
88+ getDisabledCompatibleChildren ( ele : any ) {
8989 if (
9090 ( ( typeof ele . type === 'object' &&
9191 ( ele . type . __ANT_BUTTON === true ||
@@ -143,7 +143,7 @@ export default defineComponent({
143143 } ,
144144
145145 // 动态设置动画点
146- onPopupAlign ( domNode , align ) {
146+ onPopupAlign ( domNode : HTMLElement , align : any ) {
147147 const placements = this . getPlacements ( ) ;
148148 // 当前返回的位置
149149 const placement = Object . keys ( placements ) . filter (
Original file line number Diff line number Diff line change @@ -12,7 +12,15 @@ const autoAdjustOverflowDisabled = {
1212
1313const targetOffset = [ 0 , 0 ] ;
1414
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 ) {
1624 if ( typeof autoAdjustOverflow === 'boolean' ) {
1725 return autoAdjustOverflow ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled ;
1826 }
@@ -22,7 +30,7 @@ export function getOverflowOptions(autoAdjustOverflow) {
2230 } ;
2331}
2432
25- export default function getPlacements ( config ) {
33+ export default function getPlacements ( config : PlacementsConfig ) {
2634 const {
2735 arrowWidth = 5 ,
2836 horizontalArrowShift = 16 ,
You can’t perform that action at this time.
0 commit comments