computed 监听不到数组使用push,但是computed对应值会发生变化 #13369
Closed
qp666
started this conversation in
General Discussions
Replies: 1 comment
-
This is expected behavior in Vue's reactivity system:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Vue version
3.5.14
Link to minimal reproduction
https://play.vuejs.org/#eNp9U0uO00AQvUqpN3YkyybMsAlOxEezAImPgB2NkLErjmfabau7nYlkeY3EBnEBhDgBl8o9qG7HHwKMLPlT7736vGq37HFdh/sG2YrFOlVFbUCjaeoNl0VZV8pACwq3AaRVWTcGswBuE5PuoIOtqkrwSOs95JLLtJLaQKlzWFuF/95begF4970PiwEUBd1O6BRNsoyC/gLWG2i5BJsj3CeiwbBu9M6nPMTtphoZiv8IKDyJtShS9O8Fyz/VOZoXrslhIn+WyVIqgaGoct8bCLY8uOb/bgtoGtMoOdWlYhS3lzPKt5y+wkgJppirelbX6frknaOeSBlivQKjTgkstnDWcxlH/fJobfRhsKxFYpC+AOLdctO2w9hdN84dR4TMGHZ1BLvq55jbHIH2OWGfGmMqCY9ScvpmzRltkrMNHH9+P375EUc9fKKq6PzlTExbdeLPX4+/vs3EcTQbhwXMaDJrW+Thta4kHVtnDmd2qkKgelWbgszkbDXYRn0JUd0+d7HRPafZYXrzj/i1PtgYZ68ValR75GzETKLIyh6+evsSD/Q+gmWVNYLYd4BvkBbd2B572pNGZtT2jOe6feZ+vkLm7/TVwaDUw1C20elkcEb/39M7Rp/avQgvnY7OJ7n4cY/K5iQDL8IH4fKSdb8BBtpWsg==
What is expected?
add方法触发时, console.log('computed')应该也触发
What is actually happening?
add方法触发时, console.log('computed')未触发
System Info
Any additional comments?
No response
Beta Was this translation helpful? Give feedback.
All reactions