mirror of
https://github.com/tenrok/maska.git
synced 2026-06-23 20:40:35 +03:00
Updated docs: note about using v-model and fix CDN
This commit is contained in:
+4
-1
@@ -20,7 +20,7 @@ npm i maska
|
|||||||
To include library from CDN, use UMD format and prefix all classes and directives with `Maska.`
|
To include library from CDN, use UMD format and prefix all classes and directives with `Maska.`
|
||||||
|
|
||||||
``` html
|
``` 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>
|
<script>
|
||||||
new Maska.MaskInput("[data-maska]") // for masked input
|
new Maska.MaskInput("[data-maska]") // for masked input
|
||||||
const mask = new Maska.Mask({ mask: "#-#" }) // for programmatic use
|
const mask = new Maska.Mask({ mask: "#-#" }) // for programmatic use
|
||||||
@@ -202,6 +202,9 @@ export default {
|
|||||||
```
|
```
|
||||||
<!-- tabs:end -->
|
<!-- tabs:end -->
|
||||||
|
|
||||||
|
!> Don’t 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
|
#### Global registration of directive
|
||||||
|
|
||||||
<!-- tabs:start -->
|
<!-- tabs:start -->
|
||||||
|
|||||||
Reference in New Issue
Block a user