Open ForeveHG opened 4 years ago
使用Object.definedPrototype实现的响应式对象,新属性没有getter、setter方法,添加这个新属性时也不会触发属性的setter,所以直接添加新属性是不能响应的,vm.$set会将新添加的属性变成响应式的,再手动触发依赖通知
使用Object.definedPrototype实现的响应式对象,新属性没有getter、setter方法,添加这个新属性时也不会触发属性的setter,所以直接添加新属性是不能响应的,vm.$set会将新添加的属性变成响应式的,再手动触发依赖通知