this.$router.go(0);
时间: 2024-04-25 13:24:08 浏览: 109
vue项目使用$router.go(-1)返回时刷新原来的界面操作
5星 · 资源好评率100%
回答: 当使用this.$router.go(0)时,它会刷新当前页面。具体来说,它会将isRouterAlive属性设置为false,然后使用$nextTick方法将其设置为true,从而触发页面的重新渲染。这样做可以达到刷新页面的效果。\[2\]
#### 引用[.reference_title]
- *1* [Vue------this.$router.back()、this.$router.go()的异同](https://blog.csdn.net/COCOLI_BK/article/details/125008955)[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* [vue 刷新当前页面,使用this.$router.go(0)闪白问题(使用provide / inject)](https://blog.csdn.net/a460550542/article/details/125102866)[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 ]
阅读全文