this.$router.push实现多次跳转
时间: 2023-08-21 22:18:30 浏览: 129
this.$router.push可以实现多次跳转。你可以在一个方法或事件中多次调用this.$router.push来实现多次跳转。每次调用this.$router.push都会将新的路由添加到路由历史记录中,并导航到相应的页面。例如,你可以这样使用this.$router.push来实现多次跳转:
```javascript
this.$router.push('/home/first');
this.$router.push('/home/second');
this.$router.push('/home/third');
```
这样就会依次跳转到'/home/first'、'/home/second'和'/home/third'页面。每次跳转都会将新的路由添加到路由历史记录中,并在页面中显示相应的内容。
#### 引用[.reference_title]
- *1* [Vue中this.$router.push(参数) 实现页面跳转](https://blog.csdn.net/weixin_57607714/article/details/126649338)[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_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [vue的跳转方式——window.open & router-link标签 & this.$router.push跳转 & this.$router.replace跳转 & ...](https://blog.csdn.net/weixin_44867717/article/details/120503404)[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_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.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)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)