[vue] 在vue组件中怎么获取到当前的路由信息?
Activity
miqidian commentedon Aug 6, 2019
this.$router.path 或者 this.$router
Real102 commentedon Sep 27, 2019
是this.$route.path吧
liuxiaoyang1 commentedon Nov 19, 2019
对,
zlqGitHub commentedon Dec 23, 2019
如果是template中获取直接
$route
即可如果是script中获取
this.$route
可以
console.log(this.$route)
查看其详细信息WenJieLi1998 commentedon Apr 19, 2020
this.$route