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 1111 <transition
1212 enter-active-class =" animated quick zoomIn"
1313 leave-active-class =" animated quick zoomOut"
14+ v-on:after-enter =" afterActionsTransitionEnter"
1415 >
1516 <template v-if =" action .tooltip " >
1617 <li v-if =" toggle" :style =" { 'background-color': action.color || bgColor }"
116117 fixedTooltip: {
117118 default: false
118119 },
120+ tooltipTimeOutWhenStartOpened: {
121+ default: 200
122+ },
119123 enableRotation: {
120124 default: true
121125 },
276280 wrapper .insertBefore (el, wrapper .childNodes [0 ]);
277281 }
278282 },
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);
291292 }
293+ },
294+ afterActionsTransitionEnter () {
295+ this .showTooltip ();
292296 }
293297 },
294298 watch: {
299303 this .moveTransition ();
300304 this .tooltipPos ();
301305 });
302- },
303- toggle (val ) {
304- this .showTooltip (val);
305306 }
306307 },
307308 mounted () {
308309 this .moveTransition ();
309310 },
310311 created () {
311312 this .setPosition ();
313+
314+ if (this .startOpened ) {
315+ this .showTooltip (this .tooltipTimeOutWhenStartOpened );
316+ }
312317 }
313318 }
314319 </script >
You can’t perform that action at this time.
0 commit comments