filterInputAttrs
Input
stable
Splits a component's $attrs into two groups: attributes that belong on the root element (class, style, id, data-*, bubbling events) and attributes that should be forwarded to the inner <input> element (non-bubbling events + the rest).
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- attrsrequisRecord<string, unknown>
- The component attrs object, typically $attrs from a Vue component using inheritAttrs: false.
API
Valeur de retour
La valeur retournée par cet util.
- A tuple of [rootAttrs, inputAttrs]. rootAttrs contains class/style/id/data-* and bubbling event listeners; inputAttrs contains all remaining attributes and non-bubbling event listeners.
Usage
Exemples
Extraits de code prêts à coller.
Split attrs between root and input