this.$router.go
时间: 2023-08-17 22:15:38 浏览: 113
this.$router.go是Vue Router中的一个方法,用于在history记录中前进或后退指定的步数。当参数val为正数时,表示前进到下一页;当参数val为负数时,表示后退到上一页;当参数val为0时,表示刷新当前页面。例如,使用this.$router.go(1)相当于调用history.forward(),使用this.$router.go(-1)相当于调用history.back()。\[3\]
#### 引用[.reference_title]
- *1* *3* [this.$router.go()和this.$router.push()的区别](https://blog.csdn.net/qq_24147051/article/details/106908582)[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^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [关于this.$router.push、replace、go的用法和区别](https://blog.csdn.net/weixin_41876674/article/details/82994925)[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^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文