File tree Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change 11
11
<transition
12
12
enter-active-class =" animated quick zoomIn"
13
13
leave-active-class =" animated quick zoomOut"
14
+ v-on:after-enter =" afterActionsTransitionEnter"
14
15
>
15
16
<template v-if =" action .tooltip " >
16
17
<li v-if =" toggle" :style =" { 'background-color': action.color || bgColor }"
116
117
fixedTooltip: {
117
118
default: false
118
119
},
120
+ tooltipTimeOutWhenStartOpened: {
121
+ default: 200
122
+ },
119
123
enableRotation: {
120
124
default: true
121
125
},
276
280
wrapper .insertBefore (el, wrapper .childNodes [0 ]);
277
281
}
278
282
},
279
- showTooltip (show ) {
280
- if (show && this .actions .length && this .fixedTooltip ) {
281
-
282
- // timeout to prevent wrong position for the tooltip
283
- setTimeout (() => {
284
- this .$refs .actions .forEach ((item ) => {
285
- if (this .toggle ) {
286
- item ._tooltip .show ();
287
- }
288
- });
289
- },700 );
290
-
283
+ showTooltip (timeOut = 0 ) {
284
+ if (this .toggle && this .actions .length && this .fixedTooltip ) {
285
+ setTimeout (() => {
286
+ this .$refs .actions .forEach ((item ) => {
287
+ if (this .toggle ) {
288
+ item ._tooltip .show ();
289
+ }
290
+ });
291
+ },timeOut);
291
292
}
293
+ },
294
+ afterActionsTransitionEnter () {
295
+ this .showTooltip ();
292
296
}
293
297
},
294
298
watch: {
299
303
this .moveTransition ();
300
304
this .tooltipPos ();
301
305
});
302
- },
303
- toggle (val ) {
304
- this .showTooltip (val);
305
306
}
306
307
},
307
308
mounted () {
308
309
this .moveTransition ();
309
310
},
310
311
created () {
311
312
this .setPosition ();
313
+
314
+ if (this .startOpened ) {
315
+ this .showTooltip (this .tooltipTimeOutWhenStartOpened );
316
+ }
312
317
}
313
318
}
314
319
</script >
You can’t perform that action at this time.
0 commit comments