unrefElement
Commons
stable
Unwrap a Vue template ref or getter to the underlying DOM element. Handles both component refs (reads .$el) and plain element refs.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- elRefrequisRef
- A Vue ref that may point to a component instance (with .$el) or directly to an HTMLElement. Functions are called to resolve the value.
API
Valeur de retour
La valeur retournée par cet util.
- The raw DOM node, or null/undefined when the ref has not yet been mounted.
Usage
Exemples
Extraits de code prêts à coller.
Access the DOM node from a template ref