vue-model-on
Advanced tools
Comparing version 1.0.0 to 1.0.2
{ | ||
"name": "vue-model-on", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"description": "Allows you to set the event type when binding model data in Vue.js", | ||
@@ -29,3 +29,4 @@ "main": "src/vue-model-on.js", | ||
"umd", | ||
"src" | ||
"src", | ||
"dist" | ||
], | ||
@@ -32,0 +33,0 @@ "author": "Craig Humphreys", |
@@ -1,8 +0,26 @@ | ||
# vue-model-on | ||
# vue-model-on for Vue 2.x | ||
Allows you to set the event type for the vue.js `v-model` directive. | ||
By default Vue's `v-model` uses the `input` event to update the underlying model data, `vue-model-on` is a simple directive that allows you to set the event type for updating model data in Vue.js. Simply use `v-model-on:event="myVar"` instead of `v-model="myVar"` | ||
## Install | ||
Install via `npm`: | ||
`npm install vue-model-on --save-dev` | ||
Then simply use `require`: | ||
`require('vue-model-on')` | ||
or import for `ES6` syntax: | ||
`import "vue-model-on"` | ||
Also available via CDN on unpkg, simply add the following to your page: | ||
`<script src="https://unpkg.com/vue-model-on@1.0.0" ></script>` | ||
## Example | ||
The following will update myVar on blur event, although you may use any javascript event you want to: | ||
The following will update `myVar` on `blur` event, although you may use any javascript event you want to: | ||
@@ -25,4 +43,6 @@ **HTML** | ||
[Check it out on JSFiddle](https://jsfiddle.net/b20jk7po/) | ||
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
2633
5
48