Vue JS Watching deep nested object

前端 未结 4 1945
深忆病人
深忆病人 2021-02-04 23:47

Disclaimer: This is my first attempt at building an MVVM app I have also not worked with vue.js before, so it could well be that my issue is a result of a more

4条回答
  •  我在风中等你
    2021-02-05 00:41

    Other solution not mentioned here: Use the deep option.

    watch:{
      block: {
        handler: function () {console.log("changed") },
        deep: true
      }
    }
    

提交回复
热议问题