Skip to content

[docs][zh-cn] synced udpates and some typos #2087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 5, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/zh-cn/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- [编程式导航](essentials/navigation.md)
- [命名路由](essentials/named-routes.md)
- [命名视图](essentials/named-views.md)
- [重定向 和 别名](essentials/redirect-and-alias.md)
- [重定向和别名](essentials/redirect-and-alias.md)
- [向路由组件传递 props](essentials/passing-props.md)
- [HTML5 History 模式](essentials/history-mode.md)
- 进阶
Expand Down
14 changes: 9 additions & 5 deletions docs/zh-cn/api/route-object.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 路由信息对象

一个 **route object(路由信息对象)** 表示当前激活的路由的状态信息,包含了当前 URL 解析得到的信息,还有 URL 匹配到的 **route records(路由记录)**。
一个 **路由信息对象 (route object)** 表示当前激活的路由的状态信息,包含了当前 URL 解析得到的信息,还有 URL 匹配到的 **路由记录 (route records)**。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多了空格


route object immutable(不可变) 的,每次成功的导航后都会产生一个新的对象。
route object 是不可变 (immutable) 的,每次成功的导航后都会产生一个新的对象。

route object 出现在多个地方:

Expand Down Expand Up @@ -66,7 +66,7 @@ route object 出现在多个地方:

- 类型: `Array<RouteRecord>`

一个数组,包含当前路由的所有嵌套路径片段的 **路由记录** 。路由记录就是 `routes` 配置数组中的对象副本还有在 `children` 数组
一个数组,包含当前路由的所有嵌套路径片段的**路由记录** 。路由记录就是 `routes` 配置数组中的对象副本 (还有在 `children` 数组)

``` js
const router = new VueRouter({
Expand All @@ -82,8 +82,12 @@ route object 出现在多个地方:
})
```

当 URL 为 `/foo/bar`,`$route.matched` 将会是一个包含从上到下的所有对象(副本)
当 URL 为 `/foo/bar`,`$route.matched` 将会是一个包含从上到下的所有对象 (副本)

- **$route.name**

当前路由的名称,如果有的话。(查看 [命名路由](../essentials/named-routes.md))
当前路由的名称,如果有的话。(查看[命名路由](../essentials/named-routes.md))

- **$route.redirectedFrom**

如果存在重定向,即为重定向来源的路由的名字。(参阅[重定向和别名](../essentials/redirect-and-alias.md))
2 changes: 1 addition & 1 deletion docs/zh-cn/essentials/redirect-and-alias.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 重定向 和 别名
# 重定向和别名

### 重定向

Expand Down