Name: awesome-mask
Owner: Moip Pagamentos
Description: The awesome-mask runs with Vue.js and uses the vanilla-masker to make your form awesome with masks.
Created: 2017-01-19 14:25:48.0
Updated: 2018-01-20 19:33:54.0
Pushed: 2018-01-04 13:30:04.0
Size: 59
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The awesome-mask runs with Vue.js
and uses the vanilla-masker
to make your form awesome with masks.
You can use patterns like:
ut type="text" v-mask="'99/99'" />
urns 1224 in 12/24
ue
ut type="text" v-mask="'(99) 9999-9999'" />
urns 1149949944 in (11) 4994-9944
ue
ut type="text" v-mask="'AAA-9999'" />
urns ABC1234 in ABC-1234
You can also format money:
ut type="text" v-mask="'money'" />
urns 123499 in 1.234,99
This directive can also receive a object from your data
like:
plate>
>
<input v-mask="mask" type="text">
p>
mplate>
ipt>
ort default {
ata() {
return {
mask: '999.999.999-99'
}
ript>
Sample using import:
ipt>
rt Component from './components/Component'
rt AwesomeMask from 'awesome-mask'
rt default {
me: 'app',
mponents: {
Component
rectives: {
'mask': AwesomeMask
ript>