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.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

el
requis
IHoverHtmlElement
The DOM element that carries the _hover internal state bag.
binding
requis
IHoverDirectiveBinding
Vue directive binding; its value determines enabled state and optional callbacks; modifiers.stop enables ripple-stop mode.
wasEnabled
requis
boolean
Whether the directive was enabled before this update. Used to avoid double-attaching listeners.
name
requis
string
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

typescript