Skip to content

Commit 2e3c77c

Browse files
MachinisteWebposva
authored andcommitted
Cleaning and better consistency for line to line translation. (#1592)
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
1 parent 902e5fb commit 2e3c77c

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

docs/en/essentials/history-mode.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ When using history mode, the URL will look "normal," e.g. `http://oursite.com/us
1515

1616
Here comes a problem, though: Since our app is a single page client side app, without a proper server configuration, the users will get a 404 error if they access `http://oursite.com/user/id` directly in their browser. Now that's ugly.
1717

18-
Not to worry: To fix the issue, all you need to do is add a simple catch-all fallback route to your server. If the URL doesn't match any static assets, it should serve the same `index.html` page that your app lives in. Beautiful, again!
18+
Not to worry: To fix the issue, all you need to do is add a simple catch-all fallback route to your server. If the URL doesn't match any static assets, it should serve the same `index.html` page that your app lives in. Beautiful, again!
1919

2020
## Example Server Configurations
2121

@@ -45,6 +45,7 @@ location / {
4545
For Node.js/Express, consider using [connect-history-api-fallback middleware](https://github.com/bripkens/connect-history-api-fallback).
4646

4747
#### Internet Information Services (IIS)
48+
4849
```xml
4950
<?xml version="1.0" encoding="UTF-8"?>
5051
<configuration>
@@ -61,10 +62,10 @@ For Node.js/Express, consider using [connect-history-api-fallback middleware](ht
6162
</rule>
6263
</rules>
6364
</rewrite>
64-
<httpErrors>
65-
<remove statusCode="404" subStatusCode="-1" />
65+
<httpErrors>
66+
<remove statusCode="404" subStatusCode="-1" />
6667
<remove statusCode="500" subStatusCode="-1" />
67-
<error statusCode="404" path="/survey/notfound" responseMode="ExecuteURL" />
68+
<error statusCode="404" path="/survey/notfound" responseMode="ExecuteURL" />
6869
<error statusCode="500" path="/survey/error" responseMode="ExecuteURL" />
6970
</httpErrors>
7071
<modules runAllManagedModulesForAllRequests="true"/>
@@ -73,6 +74,7 @@ For Node.js/Express, consider using [connect-history-api-fallback middleware](ht
7374
```
7475

7576
#### Caddy
77+
7678
```
7779
rewrite {
7880
regexp .*

docs/en/essentials/nested-routes.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ const User = {
4848
}
4949
```
5050

51-
To render components into this nested outlet, we need to use the `children`
52-
option in `VueRouter` constructor config:
51+
To render components into this nested outlet, we need to use the `children` option in `VueRouter` constructor config:
5352

5453
``` js
5554
const router = new VueRouter({

docs/en/essentials/passing-props.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ const User = {
2727
const router = new VueRouter({
2828
routes: [
2929
{ path: '/user/:id', component: User, props: true }
30-
30+
3131
// for routes with named views, you have to define the props option for each named view:
3232
{
33-
path: '/user/:id',
33+
path: '/user/:id',
3434
components: { default: User, sidebar: Sidebar },
3535
props: { default: true, sidebar: false }
3636
}
@@ -59,8 +59,7 @@ const router = new VueRouter({
5959

6060
### Function mode
6161

62-
You can create a function that returns props.
63-
This allows you to cast the parameter to another type, combine static values with route-based values, etc.
62+
You can create a function that returns props. This allows you to cast the parameter to another type, combine static values with route-based values, etc.
6463

6564
``` js
6665
const router = new VueRouter({
@@ -72,8 +71,6 @@ const router = new VueRouter({
7271

7372
The url: `/search?q=vue` would pass `{query: "vue"}` as props to the SearchUser component.
7473

75-
Try to keep the props function stateless, as it's only evaluated on route changes.
76-
Use a wrapper component if you need state to define the props, that way vue can react to state changes.
77-
74+
Try to keep the props function stateless, as it's only evaluated on route changes. Use a wrapper component if you need state to define the props, that way vue can react to state changes.
7875

7976
For advanced usage, checkout the [example](https://github.com/vuejs/vue-router/blob/dev/examples/route-props/app.js).

0 commit comments

Comments
 (0)