Skip to content

Commit dcbf4be

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into working
# Conflicts: # docs/en/essentials/nested-routes.md # docs/en/installation.md
2 parents 3292006 + 27113ab commit dcbf4be

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

docs/en/essentials/history-mode.md

+6-4
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/passing-props.md

+4-7
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).

docs/en/installation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[https://unpkg.com/vue-router/dist/vue-router.js](https://unpkg.com/vue-router/dist/vue-router.js)
66

77
<!--email_off-->
8-
[Unpkg.com](https://unpkg.com) fournit des liens CDN basés sur NPM. Le lien ci-dessus pointera toujours vers la dernière release sur NPM. Vous pouvez aussi utiliser un tag ou une version spécifique via une URL comme `https://unpkg.com/[email protected]/dist/vue-router.js`.
8+
[Unpkg.com](https://unpkg.com) fournit des liens CDN basés sur npm. Le lien ci-dessus pointera toujours vers la dernière version sur npm. Vous pouvez aussi utiliser un tag ou une version spécifique via une URL comme `https://unpkg.com/[email protected]/dist/vue-router.js`.
99
<!--/email_off-->
1010

1111
Incluez `vue-router` après Vue et l'installation sera automatique :
@@ -15,7 +15,7 @@ Incluez `vue-router` après Vue et l'installation sera automatique :
1515
<script src="/path/to/vue-router.js"></script>
1616
```
1717

18-
### NPM
18+
### npm
1919

2020
``` bash
2121
npm install vue-router

0 commit comments

Comments
 (0)