vue2.0监听数组中对象属性的变化

vue项目中如何对数组中的对象属性变化进行监听呢?


data () {

return {
aDemo: [
        {
          key1: '',
          key2: ''
        }
      ]
}
},
watch: {    
aDemo:{
handler: function (newVal) {
        console.log(newVal)   
    },      
deep: true    //深度监听

}

你可能感兴趣的:(vue2.0)