updateHover
Commons
stable
Sync the v-hover directive's internal state on an element when its binding value or modifiers change. Adds or removes the hover class and mouse/touch listeners accordingly.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- elrequisIHoverHtmlElement
- The DOM element that carries the _hover internal state bag.
- bindingrequisIHoverDirectiveBinding
- Vue directive binding; its value determines enabled state and optional callbacks; modifiers.stop enables ripple-stop mode.
- wasEnabledrequisboolean
- Whether the directive was enabled before this update. Used to avoid double-attaching listeners.
- namerequisstring
- The component block name used to build the hover class, e.g. "origam-btn" produces class "origam-btn--hover".
API
Valeur de retour
La valeur retournée par cet util.
- No return value. Mutates the element's event listeners and _hover state in place.
Usage
Exemples
Extraits de code prêts à coller.
Directive updated hook