this.$router.push() prrtmission
时间: 2023-09-28 18:06:53 浏览: 78
Vue this.$router.push(参数)实现页面跳转操作
引用提到,在使用this.$router.push()方法时,不能同时使用path和params参数,否则params参数将无效。需要通过name属性来指定页面。在路由配置文件中定义参数后,可以通过name属性来访问参数。因此,如果你想在this.$router.push()中传递params参数,你需要先在路由配置文件中定义参数,并使用name属性来指定页面。然后在this.$router.push()方法中使用name属性来指定要跳转的页面,并在params参数中传递所需的参数值。这样,你就可以通过this.$router.push()方法传递params参数了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [解决vue.js this.$router.push无效的问题](https://download.csdn.net/download/weixin_38702339/13588275)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Vue中this.$router.push参数获取方法](https://download.csdn.net/download/weixin_38651273/13193399)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [vue.js this.$router.push获取不到params参数问题](https://download.csdn.net/download/weixin_38656142/12927619)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文