watch: { queryData: { handler: function() { //do something }, deep: true } }
watch: { 'queryData.name': { handler: function() { //do something }, } } 或 watch: { 'queryData.name'(newValue, oldValue) { console.log(newValue) } } 监听对象具体属性,方法二(computed+watch)
computed: { getName: function() { return this.queryData.name } } watch: { getName: { handler: function() { //do something }, } }