awesome-mask
Advanced tools
Comparing version 0.2.2 to 0.2.3
{ | ||
"name": "awesome-mask", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "An awesome mask directive for Vue.js using vanilla-masker from `https://github.com/BankFacil/vanilla-masker`", | ||
@@ -29,3 +29,4 @@ "main": "index.js", | ||
"index.js", | ||
"scripts" | ||
"scripts", | ||
"is-character-keypress.js" | ||
], | ||
@@ -32,0 +33,0 @@ "devDependencies": { |
@@ -6,3 +6,3 @@ The awesome-mask runs with `Vue.js` and uses the `vanilla-masker` to make your form awesome with masks. | ||
``` | ||
<input type="text" v-mask="'99/99' /> | ||
<input type="text" v-mask="'99/99'" /> | ||
// Turns 1224 in 12/24 | ||
@@ -12,3 +12,3 @@ ``` | ||
``` | ||
<input type="text" v-mask="'(99) 9999-9999' /> | ||
<input type="text" v-mask="'(99) 9999-9999'" /> | ||
// Turns 1149949944 in (11) 4994-9944 | ||
@@ -20,3 +20,3 @@ ``` | ||
``` | ||
<input type="text" v-mask="'AAA-9999' /> | ||
<input type="text" v-mask="'AAA-9999'" /> | ||
// Turns ABC1234 in ABC-1234 | ||
@@ -42,25 +42,1 @@ ``` | ||
``` | ||
You can also change the mask on the fly: | ||
``` | ||
<template> | ||
<p><input v-mask="mask" type="text" @input="updateMask"></p> | ||
</template> | ||
<script> | ||
export default { | ||
data() { | ||
return { | ||
mask: '999.999.999-99' | ||
} | ||
}, | ||
methods: { | ||
updateMask (val) { | ||
if(val.lenght > 14 ){ | ||
this.mask = '99.999.999/9999-99' | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4326
6
48
39