File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import abstractTooltipProps from './abstractTooltipProps';
12
12
import useConfigInject from '../_util/hooks/useConfigInject' ;
13
13
import getPlacements from './placements' ;
14
14
import firstNotUndefined from '../_util/firstNotUndefined' ;
15
+ import raf from '../_util/raf' ;
15
16
export type { AdjustOverflow , PlacementsConfig } from './placements' ;
16
17
17
18
export type TooltipPlacement = typeof placementTypes [ number ] ;
@@ -93,13 +94,16 @@ export default defineComponent({
93
94
`'defaultVisible' is deprecated, please use 'v-model:visible'` ,
94
95
) ;
95
96
} ) ;
97
+ let rafId : any ;
96
98
watch (
97
99
( ) => props . visible ,
98
100
val => {
99
- visible . value = ! ! val ;
101
+ raf . cancel ( rafId ) ;
102
+ rafId = raf ( ( ) => {
103
+ visible . value = ! ! val ;
104
+ } ) ;
100
105
} ,
101
106
) ;
102
-
103
107
const isNoTitle = ( ) => {
104
108
const title = props . title ?? slots . title ;
105
109
return ! title && title !== 0 ;
You can’t perform that action at this time.
0 commit comments