this.
r
o
u
t
e
路
由
的
参
数
对
象
t
h
i
s
.
route 路由的参数对象 this.
route路由的参数对象this.router路由的导航对象
传参:
props:true
哈希地址 / 路径参数 this.
r
o
u
t
e
.
p
a
r
a
m
s
哈
希
地
址
?
查
询
参
数
t
h
i
s
.
route.params 哈希地址 ?查询参数 this.
route.params哈希地址?查询参数this.route.query
fullPath 完整路径
path 路径部分
声明式导航
编程式导航 :调用API
location.herf 浏览器自带
导航守卫可以控制路由的访问权限
localstore 里面的token
全局前置守卫
router.beforeEach(fn)
token的位置
const token = localStorage.getItem('token')