2
0
mirror of https://github.com/tenrok/maska.git synced 2026-06-05 16:42:28 +03:00

Updated docs: note about using v-model and fix CDN

This commit is contained in:
Alexander Shabunevich
2022-12-07 22:04:38 +03:00
parent 108c8ea680
commit f72af982b9
+4 -1
View File
@@ -20,7 +20,7 @@ npm i maska
To include library from CDN, use UMD format and prefix all classes and directives with `Maska.`
``` html
<script src="https://cdn.jsdelivr.net/npm/maska@latest/dist/maska.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/maska@2/dist/maska.umd.js"></script>
<script>
new Maska.MaskInput("[data-maska]") // for masked input
const mask = new Maska.Mask({ mask: "#-#" }) // for programmatic use
@@ -202,6 +202,9 @@ export default {
```
<!-- tabs:end -->
!> Dont use `v-model` on masked input: it possible will be buggy,
because its value is taken from the input event instead of the input value.
#### Global registration of directive
<!-- tabs:start -->