File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ A route object exposes the following properties:
2424
2525 An array containing the route configuration objects for all matched segments in the current route.
2626
27+ - ** $route.name**
28+
29+ The name of the current route, if it has one. (See [ named routes] ( ./named.md ) )
30+
2731### Custom Fields
2832
2933In addition to the built-in properties, custom fields defined in the route config will also be merged on to the route object. For example:
Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ Vue-router 做路径匹配时支持动态片段、全匹配片段以及查询参
2525
2626 数组,包含当前匹配的路径中所包含的所有片段所对应的配置参数对象。
2727
28+ - ** $route.name**
29+
30+ 当前路径的名字。 (参见[ 具名路径] ( ./named.md ) )
31+
2832### 自定义字段
2933
3034除了以上这些内置的属性外,在路由设置对象中的其他自定义字段也会被拷贝到最终的路由对象上。例如:
You can’t perform that action at this time.
0 commit comments