I want to use v-model and v-on with checkbox
like this : <input type="checkbox" v-model="test" v-on="click: foo">
jsfiddle: http://jsfiddle.net/c686xbrn/
but chrome and firefox alert different result
how can I get same? thx
Don't use v-on, use watch: http://jsfiddle.net/yyx990803/c686xbrn/1/
Use components: http://jsfiddle.net/yyx990803/7hk7rz10/2/
@yyx990803 How about v-model and v-on:paste="work_shorten" with input textbox?
I would like to have new data when paste event fired.
https://jsfiddle.net/ianpatel/1c1mqcfh/
There is another(but not so that elegant) workaround, wrap you onclick logic with Vue.nextTick
onClickFunc(){
Vue.nextTick(()=>{
//here goes your onclick logic
});
}
Don't use
v-on, usewatch: http://jsfiddle.net/yyx990803/c686xbrn/1/
Can you please replace your vue.js CDN URL.
@kushal555 this is a 4 year old issue, applies to Vue 0.11 or something.
Most helpful comment
Don't use
v-on, usewatch: http://jsfiddle.net/yyx990803/c686xbrn/1/