【BUG】watch() 传入reactive类型的响应式数据,vue3.4版本与3.3/3.2表现不一致
Vue version
3.4
Link to minimal reproduction
Steps to reproduce
watch监听reactive数据设置deep:fasle时,点击按钮改变reactive对象深层属性的值(data.obj.demo)时,不会触发watch监听回调。
What is expected?
vue3.3或3.2版本的watch()监听reactive数据时,deep会默认强制为true,所以修改数据深层的属性时会正确触发监听的回调函数。
What is actually happening?
3.2、3.3版本的watch() 传入reactive类型监听源,即使deep设置为false,修改深层属性会触发监听回调。 但在3.2升到3.4版本时,代码不变,deep依旧是false,此时修改reactive里深层的属性,不会触发监听!
System Info
No response
Any additional comments?
No response
3.4 behavior is correct, 3.3 behaviour was a bug.