vue watch dieťa vlastnosť
...
watch:{
'item.someOtherProp'(newVal){
//to work with changes in "myArray"
},
'item.prop'(newVal){
//to work with changes in prop
}
}
vue sledovať hlboké majetku
watch: {
item: {
handler(val){
// do stuff
},
deep: true
}
}
vue watch člen objektu
// Use a deep watcher for that:
watch: {
item: {
handler(val){
// do stuff
},
deep: true
}
}