How to delay the disappearance of elementui tooltip components, - vuejs2

I used the elementui tooltip component, and I saw that only delayed display by 'open-delay', how to make it delay disappear

Have you tried hide-after property ? Here is an example : https://jsfiddle.net/budgw/58mdw0et/
If you want to delay when the mouse leaves the element, first use the manual property on el-tooltip. Then use mousenter and mouseleave envents (in case of an el-button) to show/hide the tooltip. You can use for example debounce method from lodash in order to delay the hide method. Here is a jsfiddle : https://jsfiddle.net/budgw/qrt3pbqm/
Hope it helps.

Related

Vuetify - Programatically trigger v-text-field animation

When a v-text-field component is populated with text or focused by the user, an animation triggers to move the label text up and to the left, and the field changes color like so:
I am trying to build a multi-select component using the v-text-field component. The reason I can't use a v-select is that my data-set is nested which is currently unsupported.
Is there a way to programmatically trigger this animation without having to focus the field?
I found a workaround that suits my purposes. There is a prop on the v-text-field component called persistent-placeholder which forces the label into the post-animated state when true.

Show hide div using v-if causes button to not trigger

I have a timer within a div, that I'm showing/hiding using v-if. The start/stop button works when there is no v-if, however when I add the v-if the button no longer works. The console is showing me nothing to debug with.

Stop Vue Fireworks animation

I'm using the vue-fireworks component (https://github.com/dampion/Vue-fireworks) to display an HTML5 Canvas animation of fireworks. It starts when the component is mounted which is fine. But I can't figure out how to make it stop. I need to stop the fireworks after a button click. I'd prefer that no more fire off and any that are onscreen when the button is clicked are allowed to continue to their conclusion.
Are you able to modify the source code of the Fireworks component?
I can see that it has a data prop of auto that is set to true.
If you could change that to a straight forward prop, then by changing that value to false it would stop adding more fireworks and let the other animations finish.
<Firework :boxHeight="'100%'" :boxWidth="'100%'" :auto="false"/>
Haven't tested myself, just an assumption reading through the code. Hope it helps.

Bootstrap native: override setFocus on dropdown handling

Aside from forking the library, is there a way to override/disable setFocus in the private show and hide methods of the dropdown?
I am using the dropdown for a mini-cart on a sticky navbar. When an item is added I'd like the dropdown to open (which works fine) but the focus is jumping to the top of the page on show and hide. I realize this is a feature and not a bug! But for this feature I want to keep any scrolling from occurring.
The only thing you can do is to is to hook into the shown.bs.dropdown and hidden.bs.dropdown events and set a different focus element after a 20ms timeout, but this is very confusing for users who use or only use keyboard navigation.

Animate in riot.js to fade in after re-render

Can anyone point me at an example of using riot.js with jQuery animations?
I'd like to tap into the event after riot re-renders something, and then fire jQuery $(selector).fadeIn() on the element that has changed. The problem is that, the element may not exist yet when I'm changing the data, so I can't run the jQuery fadeIn until after Riot finishes re-rendering.
The best I can come up with is setTimeout; is there an event in Riot that I can listen to directly?
Usually, Riot has two events for re-rendering:
update - this is before rendering
updated - after rendering has happened
this.on(
'update',
function () {
}
)
One another possibility, is to learn about MutationObserver.
See http://davidwalsh.name/demo/detect-node-insertion.php
The riot events only tells you that something has been updated or is about to update, but not what parts of the dom will change.