Reputation: 2053
Is there a way to watch a single property with several handlers?
I need it because I need some instructions to be immediate
, and some others not. I guess the only solution for this is to create 2 watchers for the same property, if it is possible.
Something like this would be great, but this doesn't work since the first watcher on myProp
is overriden:
watch: {
myProp: {
immediate: true,
handler () {
// instructions
}
},
myProp() {
// instructions
}
}
Live test here
Upvotes: 1
Views: 107