getUid

Commons
stable

Returns a stable numeric UID for the calling Vue component instance. The same instance always receives the same integer; different instances receive different integers. Useful for generating unique DOM id attributes (aria-controls, aria-labelledby, …).

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Valeur de retour

La valeur retournée par cet util.

A positive integer unique to the current component instance for the lifetime of the application.

Usage

Exemples

Extraits de code prêts à coller.

Generate a stable aria id

typescript