$router.addRoute
时间: 2023-12-12 21:05:37 浏览: 81
从头开始学习vue-router
`$router.addRoute`是Vue Router中的一个方法,用于动态添加路由规则。它接受一个符合路由规则要求的数组作为参数。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* [this.$router的方法总结](https://blog.csdn.net/Hassanh/article/details/127611258)[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]
- *2* *3* [vue动态路由添加,vue-router的addRoute方法实现权限控制,添加根路由和子路由](https://blog.csdn.net/m0_46672781/article/details/126860144)[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]
[ .reference_list ]
阅读全文