eventName

Commons
stable

Converts a Vue prop name in the "onXxx" format to the corresponding event name "xxx". Used internally to derive emit names from prop names.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

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

propName
requis
string
A Vue prop name starting with "on" followed by a capitalised event name, e.g. "onClick", "onUpdate:modelValue".

API

Valeur de retour

La valeur retournée par cet util.

The corresponding event name with the "on" prefix removed and the first letter lowercased, e.g. "click" or "update:modelValue".

Usage

Exemples

Extraits de code prêts à coller.

Derive event name from prop

typescript