useMaska
Overview
Applies a maska input mask to an element ref with reactive options. When called inside a component setup, initializes on mount and cleans up on unmount. When called outside a component context, initializes immediately. Cleanup is tied to the enclosing effect scope via tryOnScopeDispose, so it works in components, watchEffect, and manual effectScope contexts. The destroy() method is also exposed for early teardown and is idempotent.
Signature
useMaska(target, options)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| target | Ref | yes | A template ref pointing to an input element or component with an input $el. |
| options | MaybeRefOrGetter | yes | Mask configuration object. May be a ref or getter for reactive updates. |
Returns
Source
client/lib/use/useMaska.js:43