From: Jay <47918755+jayredk@users.noreply.github.com> Date: Mon, 20 Feb 2023 17:18:06 +0000 (+0800) Subject: docs: Update index.md (fix #1236) (#1656) X-Git-Tag: v4.2.0~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04829e8b374732d4d1e58ddf3afed645422c0516;p=thirdparty%2Fvuejs%2Frouter.git docs: Update index.md (fix #1236) (#1656) --- diff --git a/packages/docs/guide/index.md b/packages/docs/guide/index.md index 6d54507e..28c01f59 100644 --- a/packages/docs/guide/index.md +++ b/packages/docs/guide/index.md @@ -74,7 +74,7 @@ app.mount('#app') // Now the app has started! ``` -By calling `app.use(router)`, we get access to it as `this.$router` as well as the current route as `this.$route` inside of any component: +By calling `app.use(router)`, we are triggering the initial navigation and giving access to `this.$router` as well as the current route as `this.$route` inside of any component: ```js // Home.vue diff --git a/packages/docs/zh/guide/index.md b/packages/docs/zh/guide/index.md index 5c4232a5..ee2a0396 100644 --- a/packages/docs/zh/guide/index.md +++ b/packages/docs/zh/guide/index.md @@ -72,7 +72,7 @@ app.mount('#app') // 现在,应用已经启动了! ``` -通过调用 `app.use(router)`,我们可以在任意组件中以 `this.$router` 的形式访问它,并且以 `this.$route` 的形式访问当前路由: +通过调用 `app.use(router)`,我们会触发第一次导航且可以在任意组件中以 `this.$router` 的形式访问它,并且以 `this.$route` 的形式访问当前路由: ```js // Home.vue