destructComputed
Commons
stable
Converts a computed getter that returns an object into individual reactive refs, one per key. Lets you destructure a computed without losing reactivity.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- getterrequisComputedGetter<T & TNotAUnion<T>>
- A function used as the computed getter. It must return a plain object whose keys will each become a reactive ref.
API
Valeur de retour
La valeur retournée par cet util.
- An object of Vue refs, one per key of the value returned by the getter. Each ref updates automatically when the computed changes.
Usage
Exemples
Extraits de code prêts à coller.
Destructure a computed object reactively