Skip to content

Commit f636b8e

Browse files
MachinisteWebposva
authored andcommitted
Doc EN: Consitency (#1477)
* Consitency accross all documentation Signed-off-by: Bruno Lesieur <[email protected]> * `lazy-loading.md` consitency Signed-off-by: Bruno Lesieur <[email protected]> * Better consitency for transitions.md Signed-off-by: Bruno Lesieur <[email protected]> * Better consistency for router-link.md Signed-off-by: Bruno Lesieur <[email protected]> * Better consitency for route-object.md Signed-off-by: Bruno Lesieur <[email protected]>
1 parent 28761c9 commit f636b8e

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

docs/en/advanced/data-fetching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default {
5555
fetchData () {
5656
this.error = this.post = null
5757
this.loading = true
58-
// replace getPost with your data fetching util / API wrapper
58+
// replace `getPost` with your data fetching util / API wrapper
5959
getPost(this.$route.params.id, (err, post) => {
6060
this.loading = false
6161
if (err) {

docs/en/advanced/lazy-loading.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
When building apps with a bundler, the JavaScript bundle can become quite large, and thus affect the page load time. It would be more efficient if we can split each route's components into a separate chunk, and only load them when the route is visited.
44

5-
Combining Vue's [async component feature](http://vuejs.org/guide/components.html#Async-Components) and Webpack's [code splitting feature](https://webpack.js.org/guides/code-splitting-require/), it's trivially easy to
5+
Combining Vue's [async component feature](http://vuejs.org/guide/components.html#Async-Components) and webpack's [code splitting feature](https://webpack.js.org/guides/code-splitting-require/), it's trivially easy to
66
lazy-load route components.
77

88
All we need to do is define our route components as async components:
99

1010
``` js
1111
const Foo = resolve => {
12-
// require.ensure is Webpack's special syntax for a code-split point.
12+
// `require.ensure` is webpack's special syntax for a code-split point.
1313
require.ensure(['./Foo.vue'], () => {
1414
resolve(require('./Foo.vue'))
1515
})
@@ -42,4 +42,4 @@ const Bar = r => require.ensure([], () => r(require('./Bar.vue')), 'group-foo')
4242
const Baz = r => require.ensure([], () => r(require('./Baz.vue')), 'group-foo')
4343
```
4444

45-
Webpack will group any async module with the same chunk name into the same async chunk - this also means we don't need to explicitly list dependencies for `require.ensure` anymore (thus passing an empty array).
45+
webpack will group any async module with the same chunk name into the same async chunk - this also means we don't need to explicitly list dependencies for `require.ensure` anymore (thus passing an empty array).

docs/en/advanced/transitions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ It is also possible to determine the transition to use dynamically based on the
4545

4646
``` js
4747
// then, in the parent component,
48-
// watch the $route to determine the transition to use
48+
// watch the `$route` to determine the transition to use
4949
watch: {
5050
'$route' (to, from) {
5151
const toDepth = to.path.split('/').length

docs/en/api/route-object.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The route object can be found in multiple places:
1616

1717
``` js
1818
router.beforeEach((to, from, next) => {
19-
// to and from are both route objects
19+
// `to` and `from` are both route objects
2020
})
2121
```
2222

@@ -25,7 +25,7 @@ The route object can be found in multiple places:
2525
``` js
2626
const router = new VueRouter({
2727
scrollBehavior (to, from, savedPosition) {
28-
// to and from are both route objects
28+
// `to` and `from` are both route objects
2929
}
3030
})
3131
```

docs/en/api/router-link.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
<!-- renders to -->
2727
<a href="home">Home</a>
2828

29-
<!-- javascript expression using v-bind -->
29+
<!-- javascript expression using `v-bind` -->
3030
<router-link v-bind:to="'home'">Home</router-link>
3131

32-
<!-- Omitting v-bind is fine, just as binding any other prop -->
32+
<!-- Omitting `v-bind` is fine, just as binding any other prop -->
3333
<router-link :to="'home'">Home</router-link>
3434

3535
<!-- same as above -->
@@ -38,7 +38,7 @@
3838
<!-- named route -->
3939
<router-link :to="{ name: 'user', params: { userId: 123 }}">User</router-link>
4040

41-
<!-- with query, resulting in /register?plan=private -->
41+
<!-- with query, resulting in `/register?plan=private` -->
4242
<router-link :to="{ path: 'register', query: { plan: 'private' }}">Register</router-link>
4343
```
4444

@@ -103,7 +103,7 @@
103103
One consequence of this is that `<router-link to="/">` will be active for every route! To force the link into "exact match mode", use the `exact` prop:
104104

105105
``` html
106-
<!-- this link will only be active at / -->
106+
<!-- this link will only be active at `/` -->
107107
<router-link to="/" exact>
108108
```
109109

0 commit comments

Comments
 (0)