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:
24
24
25
25
An array containing the route configuration objects for all matched segments in the current route.
26
26
27
+ - ** $route.name**
28
+
29
+ The name of the current route, if it has one. (See [ named routes] ( ./named.md ) )
30
+
27
31
### Custom Fields
28
32
29
33
In 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 做路径匹配时支持动态片段、全匹配片段以及查询参
25
25
26
26
数组,包含当前匹配的路径中所包含的所有片段所对应的配置参数对象。
27
27
28
+ - ** $route.name**
29
+
30
+ 当前路径的名字。 (参见[ 具名路径] ( ./named.md ) )
31
+
28
32
### 自定义字段
29
33
30
34
除了以上这些内置的属性外,在路由设置对象中的其他自定义字段也会被拷贝到最终的路由对象上。例如:
You can’t perform that action at this time.
0 commit comments