vue相关,使用watch监听props中的Obiect对象,为什么每次表单选择都会触发watch的?
props: {
formQuery: {// 声明一个根对象,跟切换表单选项,自动刷新数据相关
type: Object,
default: () => {},
},
-----------------------------------------------------------------------------
watch: {
formQuery: {// 跟切换表单选项,自动刷新数据相关
handler() {
this.pageParam.pageNo = 1;
this.queryParam = Object.assign({}, this.formQuery, this.param);
this.getList();
},
deep: true,
},
为什么this.param中的数据发生改变,也能触发watch监听的?