Answer the question
In order to leave comments, you need to log in
Is there a way to track changes to all data in vue?
The meaning of the question is that there is a vue instance
var app = new Vue({
el: '#app',
data: {
var1:1,
var2:2,
var3:3,
..
varN:N
}
})
Answer the question
In order to leave comments, you need to log in
You can wrap it in an object and hang watch on this object
var1:1,
var2:2,
var3:3,
..
varN:N
form: {
var1:1,
var2:2,
var3:3,
..
varN:N
}
watch: {
form: {
handler: function(newForm, oldForm) {...}
deep: true
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question