Skip to content

Fix three spelling error #1792

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 1 commit into from
Oct 9, 2017
Merged
Changes from all 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
4 changes: 2 additions & 2 deletions docs/zh-cn/essentials/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ router.push({ path: '/user', params: { userId }}) // -> /user

同样的规则也适用于 `router-link` 组件的 `to` 属性。

在 2.2.0+,可选的在 `router.push` 或 `router.replace` 中提供 `onComplete` 和 `onAbort` 回调作为第二个和第三个参数。这些回调将会在导航成功完成 (在所有的异步钩子被解析之后) 或终止 (导航到相同的路有、或在当前导航完成之前导航到另一个不同的路有) 的时候进行相应的调用。
在 2.2.0+,可选的在 `router.push` 或 `router.replace` 中提供 `onComplete` 和 `onAbort` 回调作为第二个和第三个参数。这些回调将会在导航成功完成 (在所有的异步钩子被解析之后) 或终止 (导航到相同的路由、或在当前导航完成之前导航到另一个不同的路由) 的时候进行相应的调用。

**注意:**如果目的地和当前路有相同,只有参数发生了改变 (比如从一个用户资料到另一个 `/users/1` -> `/users/2`),你需要使用 [`beforeRouteUpdate`](./dynamic-matching.html#响应路由参数的变化) 来响应这个变化 (比如抓取用户信息)。
**注意:**如果目的地和当前路由相同,只有参数发生了改变 (比如从一个用户资料到另一个 `/users/1` -> `/users/2`),你需要使用 [`beforeRouteUpdate`](./dynamic-matching.html#响应路由参数的变化) 来响应这个变化 (比如抓取用户信息)。

#### `router.replace(location, onComplete?, onAbort?)`

Expand Down