vue获取当前路由

vue获取当前路由,第1张

vue 获取当前路由

console.log(this.$route.path)

友情提示:

$router用来 *** 作对象,比如路由跳转的时候使用,即this.$router.push('xxxx')

$route用来获取信息。比如获取当前路由this.$route.path、获取路由传递的参数this.$route.query

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1321333.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-12
下一篇 2022-06-12

发表评论

登录后才能评论

评论列表(0条)

保存