First of all thanks for Vue, it's greate solution for me
this is my Vue Instance
new Vue({
data:{
a:1,
b:2,
c:3
}
....
});
I want update a,b,c by once, how did it?
Just set them one by one?...
Please don't use issues to ask questions.
You can just update them one by one. Vue batches DOM updates and watchers
calls for you.
@yyx990803 can you please provide a way to update(actually it's replace) the object that referenced by $data, e.g. vm.loadData(a new object with same struct) etc.
@Akryum Thank you very much, I'll try it.
@Akryum THanks 👍
for those who don't have the time to click :
...
,
methods: {
replaceData () {
const newData = {
a: 1,
b: 2,
c: 3,
}
Object.assign(this.$data, newData)
}
},
...
Most helpful comment
https://jsfiddle.net/Akryum/bm9e8bgy/