-
-
Notifications
You must be signed in to change notification settings - Fork 5k
[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
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 (路由记录)**。 | ||
|
||
route object 是 immutable(不可变) 的,每次成功的导航后都会产生一个新的对象。 | ||
route object 是 immutable (不可变) 的,每次成功的导航后都会产生一个新的对象。 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同上 |
||
|
||
route object 出现在多个地方: | ||
|
||
|
@@ -66,7 +66,7 @@ route object 出现在多个地方: | |
|
||
- 类型: `Array<RouteRecord>` | ||
|
||
一个数组,包含当前路由的所有嵌套路径片段的 **路由记录** 。路由记录就是 `routes` 配置数组中的对象副本(还有在 `children` 数组)。 | ||
一个数组,包含当前路由的所有嵌套路径片段的 **路由记录** 。路由记录就是 `routes` 配置数组中的对象副本 (还有在 `children` 数组)。 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
``` js | ||
const router = new VueRouter({ | ||
|
@@ -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)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 重定向 和 别名 | ||
# 重定向和别名 | ||
|
||
### 重定向 | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
括号内外对调一下?