美文网首页
vue route及router

vue route及router

作者: blank_lion | 来源:发表于2019-11-18 21:06 被阅读0次

https://router.vuejs.org/zh/guide/essentials/navigation.html
router是VueRouter的一个全局对象,包含路由跳转的方法:push,replace,go
route 是当前路由的一个对象,包含各种属性:path,name,params,query ,matched
需要注意的是route在组件mounted后才可访问,created函数中访问为undefined

相关文章

网友评论

      本文标题:vue route及router

      本文链接:https://www.haomeiwen.com/subject/fdfiictx.html