reactive vue
时间: 2023-08-21 15:17:47 浏览: 43
回答: 在Vue3中,reactive是一种实现响应式数据的方法。它通过ES6的Proxy来实现,相比于Vue2中使用defineProperty来实现响应式数据,reactive具有更好的性能和灵活性。\[2\]在使用reactive时,需要注意传递的参数必须是对象(json/arr),如果传递其他类型的对象,默认情况下修改对象后,界面不会自动更新。如果想要更新界面,可以通过重新赋值的方式来实现。\[2\]此外,需要注意的是,一旦使用reactive创建了响应式对象,就不能再改变它的引用,也就是不能随意替换一个响应式对象。\[3\]
#### 引用[.reference_title]
- *1* *3* [Vue3 - reactive 复杂类型(通俗易懂,详细教程)](https://blog.csdn.net/weixin_44198965/article/details/127861543)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Vue3中reactive的理解](https://blog.csdn.net/weixin_47886687/article/details/112918795)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)