diff --git a/docs/README.md b/docs/README.md index b210781..01ac8b1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -134,7 +134,67 @@ export default { ``` -### Set options with directive +### Get value + +To get masked value you can use standard `v-model` directive. +But if you want to access an unmasked (raw) value, you can pass a variable as `v-maska` directive value. +This variable should be a reactive object that will contains three fields after mask processing: + +- `masked`: string with masked result +- `unmasked`: string with unmasked result +- `completed`: boolean flag indicating that mask is completed + + +### **Composition API** + +``` html + + + +``` + +### **Options API** + +``` html + + + +``` + + +### Set mask options To set default options for the mask you could use directive *argument* (part after `v-maska:`). It can be plain or reactive object and should be wrapped in `[]`: @@ -180,63 +240,6 @@ export default { ``` -### Bind to variable - -It’s very easy to bind mask result to a variable. -This variable should be reactive object and will contains three fields: - -- `masked`: string with masked result -- `unmasked`: string with unmasked result -- `completed`: boolean flag indicating that mask is completed - - -### **Composition API** - -``` html - - - -``` - -### **Options API** - -``` html - - - -``` - - #### Global registration of directive