directive-inputmask
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "directive-inputmask", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "InputMask for Vue.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -19,15 +19,6 @@ # directive-inputmask | ||
```typescript | ||
import Vue from 'vue' | ||
const VueInputMask = require('vue-inputmask').default | ||
import {DirectiveInputmask} from "directive-inputmask"; | ||
Vue.use(VueInputMask) | ||
``` | ||
## With a script tag | ||
```html | ||
<script src="./node_modules/inputmask/dist/inputmask/dependencyLibs/inputmask.dependencyLib.js"></script> | ||
<script src="./node_modules/inputmask/dist/inputmask/inputmask.js"></script> | ||
<script src="./dist/vue-inputmask-browser.js"></script> | ||
``` | ||
# Usage | ||
@@ -40,14 +31,9 @@ ```html | ||
```javascript | ||
new Vue({ | ||
... | ||
methods: { | ||
maskCheck: function (field){ | ||
if (field.target.inputmask.isComplete()) { | ||
console.log('is Complete'); | ||
} else { | ||
console.log('is Incomplete'); | ||
} | ||
import {DirectiveInputmask} from "directive-inputmask"; | ||
export default { | ||
directives: { | ||
"mask": DirectiveInputmask | ||
} | ||
} | ||
}); | ||
``` |
171476
38