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';
1212import useConfigInject from '../_util/hooks/useConfigInject' ;
1313import getPlacements from './placements' ;
1414import firstNotUndefined from '../_util/firstNotUndefined' ;
15+ import raf from '../_util/raf' ;
1516export type { AdjustOverflow , PlacementsConfig } from './placements' ;
1617
1718export type TooltipPlacement = typeof placementTypes [ number ] ;
@@ -93,13 +94,16 @@ export default defineComponent({
9394 `'defaultVisible' is deprecated, please use 'v-model:visible'` ,
9495 ) ;
9596 } ) ;
97+ let rafId : any ;
9698 watch (
9799 ( ) => props . visible ,
98100 val => {
99- visible . value = ! ! val ;
101+ raf . cancel ( rafId ) ;
102+ rafId = raf ( ( ) => {
103+ visible . value = ! ! val ;
104+ } ) ;
100105 } ,
101106 ) ;
102-
103107 const isNoTitle = ( ) => {
104108 const title = props . title ?? slots . title ;
105109 return ! title && title !== 0 ;
You can’t perform that action at this time.
0 commit comments