vue获取当前路由


完整url可以用 window.location.href
路由路径可以用 this.$route.path
路由路径参数 this.$route.params 例如:/user/:id → /user/2044011030 → this.$route.params.id
路由查询参数 this.$route.query 例如:/user/search?name=sf → this.$route.query.name

原文链接:https://blog.csdn.net/a350110085/article/details/90053111


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM