vuejs / composition-api

Composition API plugin for Vue 2
https://composition-api.vuejs.org/
MIT License
4.19k stars 343 forks source link

Getting the property set by the `set` method through a function is not reactive #993

Closed cscxj closed 2 months ago

cscxj commented 3 months ago

In the template, I obtained the newly set property of the reactive object through a function, and the view was not reactive, but directly taking this value was reactive. I used Vue 3 to implement the same logic, and it was reactive. Vue 2 example Vue 3 example

jacekkarczmarczyk commented 3 months ago

https://github.com/vuejs/vue/issues/12774#issuecomment-1274141924

cscxj commented 2 months ago

vuejs/vue#12774 (comment)

Thanks.