the following is a copy of the official document, but I haven"t figured out the difference between the two methods
sometimes you may need to assign multiple new properties to existing objects, such as using Object.assign () or _ .extend (). In this case, you should create a new object with the properties of both objects. So, if you want to add new responsive attributes, don"t go like this:
Object.assign (vm.userProfile, {
age: 27,
favoriteColor: "Vue Green"
})
you should do this:
vm.userProfile = Object.assign ({}, vm.userProfile, {
age: 27,
favoriteColor: "Vue Green"
})