Subscribe on changes!

There are two bugs in monitoring all attributes of a responsive data defined by reactive

avatar
Jul 17th 2022

Vue version

3.2.37

Link to minimal reproduction

https://sfc.vuejs.org/#eNp9UrtuwzAM/BVCixPAD3QrHCdAf6BT0UmLYtOJA70gyc5g+N9LWWkatEEHGxTveEeRmtmbteU0IqtZ41s32AAew2gPXA/KGhdgBod9Tj/RhmHCHK4itGdYoHdGQUa1GddcSwxgZPcuFMI+lmyybBuB1mgfwKLzRq9I0tnMmqg1ZB9GZTmIE8Uvr8t2B1wDfavLJpXlsNF4/RRyJHsyWaMt7A8wR/KP7TdWRu0IRXMjsZTm9Exix/WSw9wh2hp6IT1SA7HppkrDoDHQIaCyUgSkE0AzaDsGmAplOpR7zlKPyZJBlUhHdwu8FfpA1pCuO88P9GUhn4g/KaEe7yW3Cz7Qm+reE8tZ2lShhC0vpE27XOfCb4DnjFRiJuZoYfHM2TkE6+uq8n0bX8DFl8adKopKN+owKCzRq+LozNWjI2HO8geNipITusKh7tCh+0/zF/WPbpRdaBVs+QIi+OMo

Steps to reproduce

1, create a reactive object 2, watch the object 3,change the object 3,display and compare the object new value and old value

What is expected?

oldValue is Old value

What is actually happening?

oldValue is new Value

System Info

No response

Any additional comments?

No response

avatar
Jul 17th 2022

You want to get the old value in the callback method parameter of watch, not just the new value

avatar
Jul 17th 2022

There are two bugs in monitoring all attributes of a responsive data defined by reactive: 1. The oldvalue cannot be obtained correctly; 2. The deep monitoring is forcibly turned on, and setting the deep configuration is invalid

avatar
Jul 17th 2022

Both of these things are expected behavior and documented.

avatar
Jul 17th 2022

这是来自QQ邮箱的自动回复邮件。您好,我已收到您发给我的邮件,我会尽快给您回复。