Skip to content

Commit 8188304

Browse files
pavelShenfnlctrl
authored andcommitted
fix translation into zh-cn (#817)
1 parent 54608ef commit 8188304

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/zh-cn/advanced/navigation-guards.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ const router = new VueRouter({
7070
``` js
7171
const Foo = {
7272
template: `...`,
73-
beforeRouteEnter (to, from, next) => {
73+
beforeRouteEnter (to, from, next) {
7474
// 在渲染该组件的对应路由被 confirm 前调用
7575
// 不!能!获取组件实例 `this`
7676
// 因为当钩子执行前,组件实例还没被创建
7777
},
78-
beforeRouteLeave (to, from, next) => {
78+
beforeRouteLeave (to, from, next) {
7979
// 导航离开该组件的对应路由时调用
8080
// 可以访问组件实例 `this`
8181
}
@@ -87,7 +87,7 @@ const Foo = {
8787
不过,你可以通过传一个回调给 `next`来访问组件实例。在导航被确认的时候执行回调,并且把组件实例作为回调方法的参数。
8888

8989
``` js
90-
beforeRouteEnter (to, from, next) => {
90+
beforeRouteEnter (to, from, next) {
9191
next(vm => {
9292
// 通过 `vm` 访问组件实例
9393
})

0 commit comments

Comments
 (0)