router-view的属性
时间: 2023-08-05 11:09:29 浏览: 199
router-view的属性是:key。\[2\]在设置router-view时,可以通过:key属性来指定组件的唯一标识,通常使用$route.fullPath作为key的值。这样可以确保在路由切换时,组件会重新渲染,而不是复用之前的组件。\[2\]
#### 引用[.reference_title]
- *1* [router-view、router-link属性、动态路由的使用、路由嵌套、路由传参](https://blog.csdn.net/qq_46302247/article/details/125085674)[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^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [router-view的key属性解决路由更新问题](https://blog.csdn.net/qq379682421/article/details/109892131)[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^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文