In vue 2.2.0+, it support to customize v-model binding prop and event by model . However, this plugin still transform to default value and input when specifying model. I hoped that it could adopt model property.
example
Vue.component('my-checkbox', {
model: {
prop: 'checked',
event: 'change'
},
props: { // this allows using the `value` prop for a different purpose
value: String, // use `checked` as the prop which take the place of `value`
checked: {
type: Number,
default: 0
}
},
// ...
})
In vue 2.2.0+, it support to customize v-model binding prop and event by
model
. However, this plugin still transform to defaultvalue
andinput
when specifyingmodel
. I hoped that it could adoptmodel
property.example