$router
是Vue Router的实例,通常用来配置和执行路由行为
https://router.vuejs.org/zh-cn/api/router-instance.html#methods
$route
路由信息对象 表示当前激活的路由的状态信息,包含了当前 URL 解析得到的信息,还有 URL 匹配到的 route records(路由记录)
https://router.vuejs.org/zh-cn/api/route-object.html
$router
是Vue Router的实例,通常用来配置和执行路由行为
https://router.vuejs.org/zh-cn/api/router-instance.html#methods
$route
路由信息对象 表示当前激活的路由的状态信息,包含了当前 URL 解析得到的信息,还有 URL 匹配到的 route records(路由记录)
https://router.vuejs.org/zh-cn/api/route-object.html
本文标题:$router 和 $route
本文链接:https://www.haomeiwen.com/subject/lgyfaxtx.html
网友评论