Go deep into the principle of corresponding change

Official Website: Principle of Corresponding Change
Insert picture description here

var vm = new Vue({
    
    
  data:{
    
    
    a:1
  }
})

// `vm.a` 是响应式的

vm.b = 2
// `vm.b` 是非响应式的
  • Object: You can use vue.set(), or this.$set(), to change
  • Array: You can also use set to achieve, and some variant array methods to achieve

Guess you like

Origin blog.csdn.net/ZHXT__/article/details/106769570