vue跳转子路由怎么不改变地址栏
时间: 2023-08-20 19:11:30 浏览: 182
回答: 当使用vue-router进行子路由跳转时,如果不想改变地址栏的内容,可以使用<router-view>标签来实现。\[1\]这个标签会在父组件中占位,用于显示子组件的内容,但不会改变地址栏的URL。这样就可以实现在不改变地址栏的情况下进行子路由的跳转。
#### 引用[.reference_title]
- *1* *3* [vue-router路由导航url已改变,但未跳转至对应组件](https://blog.csdn.net/mmsmsmm/article/details/126528668)[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* [vue路由跳转](https://blog.csdn.net/weixin_45441173/article/details/124519748)[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 ]
阅读全文