From c26bf53146bc4f4647ba9bb77808a3dc800c1635 Mon Sep 17 00:00:00 2001 From: 773500646 <773500646@qq.com> Date: Tue, 6 Feb 2018 17:09:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?this.$router=E6=A0=87=E9=A2=98=E6=9C=89?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在组件中访问当前路由使用this.$route,页面中标题写的是this.$router --- docs/zh-cn/essentials/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh-cn/essentials/getting-started.md b/docs/zh-cn/essentials/getting-started.md index 25619d491..d8b464b0c 100644 --- a/docs/zh-cn/essentials/getting-started.md +++ b/docs/zh-cn/essentials/getting-started.md @@ -63,7 +63,7 @@ const app = new Vue({ // 现在,应用已经启动了! ``` -通过注入路由,我们可以用 `this.$router` 来访问它,就像在任何组件里用 `this.$router` 访问当前路由一样。 +通过注入路由,我们可以用 `this.$route` 来访问它,就像在任何组件里用 `this.$route` 访问当前路由一样。 ```js // Home.vue From 400f2fd8f96ad15374c6c85110e3c0f7e4077ec7 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Tue, 27 Feb 2018 17:56:40 +0100 Subject: [PATCH 2/2] Update getting-started.md --- docs/zh-cn/essentials/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh-cn/essentials/getting-started.md b/docs/zh-cn/essentials/getting-started.md index d8b464b0c..11abb6996 100644 --- a/docs/zh-cn/essentials/getting-started.md +++ b/docs/zh-cn/essentials/getting-started.md @@ -63,7 +63,7 @@ const app = new Vue({ // 现在,应用已经启动了! ``` -通过注入路由,我们可以用 `this.$route` 来访问它,就像在任何组件里用 `this.$route` 访问当前路由一样。 +通过注入路由器,我们可以在任何组件内通过 `this.$router` 访问路由器,也可以通过 `this.$route` 访问当前路由: ```js // Home.vue