Skip to content

Commit 2f938ac

Browse files
Merge branch 'master' into api/index.md
2 parents 4b12ba0 + adebe4f commit 2f938ac

File tree

104 files changed

+3300
-2635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+3300
-2635
lines changed

README.md

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -16,45 +16,4 @@ $ hexo server
1616

1717
La traduction pour ce projet de documentation est actuellement maintenu dans des dépôts forkés depuis celui-ci.
1818

19-
### Mandarin
20-
21-
* Dépôt de traduction - [/vuejs/cn.vuejs.org](https://github.com/vuejs/cn.vuejs.org)
22-
23-
### Japonais
24-
25-
La traduction japonaise est maintenue par [Vue.js japan user group](https://github.com/vuejs-jp)
26-
27-
* Dépôt de traduction - [/vuejs/jp.vuejs.org](https://github.com/vuejs/jp.vuejs.org)
28-
* Mainteneur principal - [kazupon](https://github.com/kazupon)
29-
30-
### Russe
31-
32-
La traduction russe est maintenue par Translation Gang.
33-
34-
* Dépôt de traduction — [/translation-gang/ru.vuejs.org](https://github.com/translation-gang/ru.vuejs.org)
35-
* Mainteneur principal - [Grigoriy Beziuk](https://gbezyuk.github.io)
36-
37-
### Italien
38-
39-
* Dépôt de traduction - [/vuejs/it.vuejs.org](https://github.com/vuejs/it.vuejs.org)
40-
41-
### Coréen
42-
43-
La traduction coréenne est maintenue par [Vue.js Korean User group](https://github.com/vuejs-kr).
44-
45-
* Dépôt de traduction - [/vuejs-kr/kr.vuejs.org](https://github.com/vuejs-kr/kr.vuejs.org)
46-
* Mainteneur principal - [ChangJoo Park](https://github.com/ChangJoo-Park)
47-
48-
### Français
49-
50-
La traduction française est maintenue par Vuejs-FR.
51-
52-
* Dépôt de traduction — [/vuejs-fr/vuejs.org](https://github.com/vuejs-fr/vuejs.org)
53-
54-
### Voulez-vous participer à la traduction ?
55-
56-
Si vous vous sentez d'attaque pour une traduction seul, forkez simplement ce dépôt, créez un ticket « work-in-progress » pour informer les autres que vous êtes entrain de le traduire, et en avant.
57-
58-
Si vous êtes plutôt du genre à participer au sein d'une équipe, peut-être que Translation Gang est fait pour vous ? Faites nous savoir de quel manière vous êtes prêt à rejoindre cette communauté internationale de traduction open-source. N'hésitez pas à contacter [Grigoriy Beziuk](https://gbezyuk.github.io) ou n'importe qui parmi [l'équipe](https://github.com/orgs/translation-gang/people).
59-
60-
Et merci à vous par avance ;)
19+
Pour connaître la liste de tous les autres projets de traduction, rendez-vous sur [la liste officielle des projets de traduction](https://github.com/vuejs/vuejs.org#on-translations).

_config.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,37 @@ markdown:
9393
smartLists: true
9494
smartypants: true
9595

96+
# Offline
97+
## Config passed to sw-precache
98+
## https://github.com/JLHwung/hexo-offline
99+
offline:
100+
maximumFileSizeToCacheInBytes: 10485760
101+
staticFileGlobs:
102+
- public/**/*.{js,html,css,png,jpg,gif,svg,eot,ttf,woff,json,xml}
103+
stripPrefix: public
104+
verbose: true
105+
runtimeCaching:
106+
- urlPattern: /*
107+
handler: cacheFirst
108+
options:
109+
origin: sendgrid.sp1.convertro.com
110+
- urlPattern: /*
111+
handler: cacheFirst
112+
options:
113+
origin: ad.doubleclick.net
114+
- urlPattern: /*
115+
handler: cacheFirst
116+
options:
117+
origin: cdn.jsdelivr.net
118+
- urlPattern: /*
119+
handler: cacheFirst
120+
options:
121+
origin: fonts.googleapis.com
122+
- urlPattern: /*
123+
handler: cacheFirst
124+
options:
125+
origin: fonts.gstatic.com
126+
96127
# Deployment
97128
## Docs: http://zespia.tw/hexo/docs/deployment.html
98129
deploy:

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@
66
"version": "3.2.2"
77
},
88
"dependencies": {
9-
"hexo": "^3.2.2",
9+
"hexo": "3.2.2",
1010
"hexo-deployer-git": "0.1.0",
1111
"hexo-generator-alias": "git+https://github.com/chrisvfritz/vuejs.org-hexo-generator-alias.git",
1212
"hexo-generator-archive": "^0.1.4",
1313
"hexo-generator-category": "^0.1.3",
1414
"hexo-generator-feed": "^1.1.0",
1515
"hexo-generator-index": "^0.2.0",
1616
"hexo-generator-tag": "^0.2.0",
17+
"hexo-offline": "^0.2.0",
1718
"hexo-renderer-ejs": "^0.2.0",
1819
"hexo-renderer-marked": "^0.2.10",
1920
"hexo-renderer-stylus": "^0.3.1",
2021
"hexo-server": "^0.2.0"
2122
}
22-
}
23+
}

src/_posts/011-component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The only exception to the rule is `v-with` (and `paramAttributes` which compiles
5454

5555
### Cleaner Event Communication
5656

57-
Previously the standard way for a child component to communicate to its parent is via dispatching events. However, with this approach, the event listeners on the parent component are not guaranteed to be listening on the desired child component only. It's also possible to trigger undesired listners further up the chain if we do not cancel the event.
57+
Previously the standard way for a child component to communicate to its parent is via dispatching events. However, with this approach, the event listeners on the parent component are not guaranteed to be listening on the desired child component only. It's also possible to trigger undesired listeners further up the chain if we do not cancel the event.
5858

5959
The most common use case is for a parent to react to the events from a specific, direct child component. So in 0.11.4, [a new directive `v-events`](/api/directives.html#v-events) has been introduced to enable exactly this behavior.
6060

src/_posts/vue-next.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ date: 2014-07-29 00:04:55
55

66
## 0.10.6
77

8-
Vue.js 0.10.6 has been released! This is another small bug-fix release and will be the last maintainance version before the next major release.
8+
Vue.js 0.10.6 has been released! This is another small bug-fix release and will be the last maintenance version before the next major release.
99

1010
<!-- more -->
1111

@@ -22,6 +22,6 @@ Some of you might have noticed there is a [next](https://github.com/yyx990803/vu
2222
- Fix some issues that are caused by design flaws in the current version. Because these changes affect the design of some core modules, it is actually easier to rewrite than to apply on the current codebase.
2323
- Improve general code quality (in particular, `compiler.js` as of now is a big pile of mess, and comments are not consistent across the codebase.)
2424

25-
Take note that the `next` branch is still in **very** early stage. The internals will change a lot, and when it comes out it **will** break current applications. Despite that I will try to keep the API changes to a minimum. Major differences with current 0.10 branch are documented in [`changes.md`](https://github.com/yyx990803/vue/blob/next/changes.md). The list is obviously incomplete and subject to change, some of them are simply ideas, but it at least gives you a taste of what to expect, and I'd appreicate your feedback on any of the topics.
25+
Take note that the `next` branch is still in **very** early stage. The internals will change a lot, and when it comes out it **will** break current applications. Despite that I will try to keep the API changes to a minimum. Major differences with current 0.10 branch are documented in [`changes.md`](https://github.com/yyx990803/vue/blob/next/changes.md). The list is obviously incomplete and subject to change, some of them are simply ideas, but it at least gives you a taste of what to expect, and I'd appreciate your feedback on any of the topics.
2626

2727
Share your thoughts at [vuejs/Discussion](https://github.com/vuejs/Discussion/issues).

src/images/data.png

36.9 KB
Loading

src/images/hn-architecture.png

55.3 KB
Loading

src/images/lifecycle.png

113 KB
Loading

src/images/mvvm.png

31.2 KB
Loading

src/images/props-events.png

17.5 KB
Loading

src/images/state.png

28.4 KB
Loading

src/images/transition.png

12.2 KB
Loading

src/menu/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
type: menu
3+
---

src/support-vuejs/index.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
# Support Vue.js Development
22

3-
<a href="https://www.patreon.com/evanyou" target="_blank">
4-
<img style="width:120px" src="https://s3.amazonaws.com/patreon_public_assets/toolbox/patreon.png">
5-
<span>Support Vue.js on Patreon (recurring pledge)</span>
6-
</a>
3+
Vue.js is an MIT licensed open source project and completely free to use.
4+
However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing. You can support Vue.js development by [pledging on Patreon](https://www.patreon.com/evanyou) (recurring, with perks for different tiers) or [donating on PayPal](https://www.paypal.me/evanyou) (one time).
5+
6+
## Current Premium Sponsors:
77

8-
<a href="https://www.paypal.me/evanyou" target="_blank">
9-
<img style="width:120px" src="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-200px.png">
10-
<span>Donate via PayPal (one time)</span>
11-
</a>
8+
### Platinum ($2000/mo)
129

13-
## Current premium sponsors:
10+
<p style="text-align: center;">
11+
<a href="https://stdlib.com">
12+
<img style="width:300px" src="/images/stdlib.png">
13+
</a>
14+
</p>
1415

15-
<p style="text-align: center; padding-top: 30px; margin-bottom: 0"><a href="http://www.thedifferenceengine.io/"><img src="/images/tde.png" style="width: 300px"></a></p>
16+
### Gold ($500/mo)
1617

1718
<p style="text-align: center; margin-top: 0; margin-bottom: 60px" class="sponsors-page">
18-
<a href="https://jsfiddle.net">
19+
<a href="https://deepstreamhub.com" target="_blank" style="width:140px;top:1px">
20+
<img src="/images/deepstream.png" style="width:140px">
21+
</a><a href="https://jsfiddle.net">
1922
<img src="/images/jsfiddle.png">
2023
</a><a href="https://laravel.com">
2124
<img src="/images/laravel.png">
@@ -29,22 +32,19 @@
2932
<img src="/images/monterail.png">
3033
</a><a href="https://www.trisoft.ro/" target="_blank">
3134
<img src="/images/trisoft.png">
32-
</a><a href="http://actualize.co" target="_blank" style="width:180px">
33-
<img src="/images/actualize.png" style="width:180px">
3435
</a><a href="https://www.2mhost.com/" target="_blank">
3536
<img src="/images/2mhost.png">
3637
</a><a href="https://vuejobs.com/?ref=vuejs" target="_blank" style="position:relative;top:6px">
37-
<img src="/images/vuejobs.png">
38+
<img src="/images/vuejobs.svg">
3839
</a><a href="https://leanpub.com/vuejs2" target="_blank">
3940
<img src="/images/tmvuejs2.png">
40-
</a><a href="https://stdlib.com/" target="_blank">
41-
<img src="/images/stdlib.png">
41+
</a><a href="https://famebroker.com" target="_blank" style="width:135px">
42+
<img src="/images/famebroker.png" style="width:135px">
43+
</a><a href="https://component.io" target="_blank" style="width:140px">
44+
<img src="/images/component_io.png" style="width:140px">
4245
</a>
4346
</p>
4447

45-
Vue.js is an MIT licensed open source project and completely free to use.
46-
However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing. You can support Vue.js development by [pledging on Patreon](https://www.patreon.com/evanyou) or [donating on PayPal](https://www.paypal.me/evanyou).
47-
4848
If you run a business and are using Vue in a revenue-generating product, it makes business sense to sponsor Vue development: **it ensures the project that your product relies on stays healthy and actively maintained.** It can also help your exposure in the Vue community and makes it easier to attract Vue developers.
4949

5050
If you are a business that is building core products using Vue.js, I am also open to conversations regarding custom sponsorship / consulting arrangements. [Get in touch on Twitter](https://twitter.com/youyuxi).

src/v2/api/index.md

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
type: api
2+
type: api (En)
33
---
44

55
## Configuration globale
66

7-
`Vue.config` est un objet contenant les configurations globales de Vue. Vous pouvez modifier les propriétés listées ci-dessous avant de mettre en place votre application :
7+
<p class="tip">**Cette page est en cours de traduction française. Revenez une autre fois pour lire une traduction achevée ou [participez à la traduction française ici](https://github.com/vuejs-fr/vuejs.org).**</p><p>`Vue.config` est un objet contenant les configurations globales de Vue. Vous pouvez modifier les propriétés listées ci-dessous avant de mettre en place votre application :</p>
88

99
### silent
1010

@@ -108,24 +108,31 @@ type: api
108108

109109
- **Utilisation :**
110110

111-
``` js
111+
```js
112112
Vue.config.keyCodes = {
113113
v: 86,
114114
f1: 112,
115+
// camelCase won`t work
115116
mediaPlayPause: 179,
117+
// instead you can use kebab-case with double quotation marks
118+
"media-play-pause" : 179,
116119
up: [38, 87]
117120
}
118121
```
119122

120-
Définit des alias pour les touches du clavier avec `v-on`.
123+
```html
124+
<input type="text" @keyup.media-play-pause="method">
125+
```
126+
127+
Définit des alias pour les touches avec `v-on`.
121128

122129
### performance
123130

124131
> Nouveau en 2.2.0
125132
126133
- **Type :** `boolean`
127134

128-
- **Par défaut :** `false`
135+
- **Par défaut :** `false` (à partir de la 2.2.3)
129136

130137
- **Utilisation :**
131138

@@ -1051,7 +1058,12 @@ Tous les hooks du cycle de vie ont automatiquement leur contexte `this` rattach
10511058
},
10521059
props: {
10531060
// cela permet d'utiliser la prop `value` à d'autres fins
1054-
value: String
1061+
value: String,
1062+
// utilise `checked` comme prop qui prend la place de `value`
1063+
checked: {
1064+
type: Number,
1065+
default: 0
1066+
}
10551067
},
10561068
// ...
10571069
})
@@ -1661,9 +1673,10 @@ Tous les hooks du cycle de vie ont automatiquement leur contexte `this` rattach
16611673
- `.{keyCode | keyAlias}` - only trigger handler on certain keys.
16621674
- `.native` - listen for a native event on the root element of component.
16631675
- `.once` - trigger handler at most once.
1664-
- `.left` - (2.2.0) only trigger handler for left button mouse events.
1665-
- `.right` - (2.2.0) only trigger handler for right button mouse events.
1666-
- `.middle` - (2.2.0) only trigger handler for middle button mouse events.
1676+
- `.left` - (2.2.0+) only trigger handler for left button mouse events.
1677+
- `.right` - (2.2.0+) only trigger handler for right button mouse events.
1678+
- `.middle` - (2.2.0+) only trigger handler for middle button mouse events.
1679+
- `.passive` - (2.3.0+) attaches a DOM event with `{ passive: true }`.
16671680

16681681
- **Utilisation :**
16691682

@@ -1733,7 +1746,8 @@ Tous les hooks du cycle de vie ont automatiquement leur contexte `this` rattach
17331746

17341747
- **Modifiers:**
17351748
- `.prop` - Bind as a DOM property instead of an attribute. ([what's the difference?](http://stackoverflow.com/questions/6003819/properties-and-attributes-in-html#answer-6004028))
1736-
- `.camel` - transform the kebab-case attribute name into camelCase. (supported since 2.1.0)
1749+
- `.camel` - (2.1.0+) transform the kebab-case attribute name into camelCase.
1750+
- `.sync` - (2.3.0+) a syntax sugar that expands into a `v-on` handler for updating the bound value.
17371751
17381752
- **Utilisation :**
17391753
@@ -1775,6 +1789,9 @@ Tous les hooks du cycle de vie ont automatiquement leur contexte `this` rattach
17751789
<!-- prop binding. "prop" must be declared in my-component. -->
17761790
<my-component :prop="someThing"></my-component>
17771791
1792+
<!-- pass down parent props in common with a child component -->
1793+
<child-component v-bind="$props"></child-component>
1794+
17781795
<!-- XLink -->
17791796
<svg><a :xlink:special="foo"></a></svg>
17801797
```
@@ -1790,6 +1807,7 @@ Tous les hooks du cycle de vie ont automatiquement leur contexte `this` rattach
17901807
- **Voir aussi :**
17911808
- [Class and Style Bindings](../guide/class-and-style.html)
17921809
- [Components - Component Props](../guide/components.html#Props)
1810+
- [Components - `.sync` Modifier](../guide/components.html#sync-Modifier)
17931811
17941812
### v-model
17951813
@@ -1943,6 +1961,31 @@ Tous les hooks du cycle de vie ont automatiquement leur contexte `this` rattach
19431961

19441962
- **Voir aussi :** [Named Slots](../guide/components.html#Named-Slots)
19451963

1964+
### is
1965+
1966+
- **Expects:** `string`
1967+
1968+
Used for [dynamic components](../guide/components.html#Dynamic-Components) and to work around [limitations of in-DOM templates](../guide/components.html#DOM-Template-Parsing-Caveats).
1969+
1970+
For example:
1971+
1972+
``` html
1973+
<!-- component changes when currentView changes -->
1974+
<component v-bind:is="currentView"></component>
1975+
1976+
<!-- necessary because <my-row> would be invalid inside -->
1977+
<!-- a <table> element and so would be hoisted out -->
1978+
<table>
1979+
<tr is="my-row"></tr>
1980+
</table>
1981+
```
1982+
1983+
For detailed usage, follow the links in the description above.
1984+
1985+
- **See also:**
1986+
- [Dynamic Components](../guide/components.html#Dynamic-Components)
1987+
- [DOM Template Parsing Caveats](../guide/components.html#DOM-Template-Parsing-Caveats)
1988+
19461989
## Built-In Components
19471990

19481991
### component

src/v2/examples/deepstream.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Temps réel avec deepstreamHub
3+
type: examples
4+
order: 9
5+
---
6+
7+
> Cet exemple utilise [deepstreamHub](https://deepstreamhub.com/) pour synchroniser les données en temps réel, émettre des évènements et faire de l'intéraction distante entre clients (vous pouvez l'ouvrir dans plusieurs fenêtres de navigateurs).
8+
9+
<iframe width="100%" height="500" src="https://jsfiddle.net/yyx990803/ff0sp9hw/embedded/result,html,js,css" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

src/v2/examples/firebase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Firebase + Validation
33
type: examples
4-
order: 2
4+
order: 10
55
---
66

77
> Cet exemple utilise [Firebase](https://firebase.google.com/) comme serveur de données persistantes et de synchronisation clientes en temps réel (vous pouvez essayer cela en ouvrant de multiples onglets dans votre navigateur). Il réalise également une validation instantanée en utilisant les propriétés calculées et déclenche des transitions CSS quand des éléments sont ajoutés/supprimés.

src/v2/examples/hackernews.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Clone de HackerNews
33
type: examples
4-
order: 10
4+
order: 12
55
---
66

77
> Ceci est un build clone du site HackerNews (HN) utilisant l'API Firebase HN officielle, Vue 2.0 + vue-router + vuex, avec un rendu côté serveur.

src/v2/examples/select2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ order: 8
66

77
> Dans cet exemple nous utilisons un plugin jQuery tiers (select2) en le plaçant à l'intérieur d'un composant personnalisé.
88
9-
<iframe width="100%" height="500" src="https://jsfiddle.net/yyx990803/fruqrvdL/embedded/result,html,js,css" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
9+
<iframe width="100%" height="500" src="https://jsfiddle.net/fruqrvdL/456/embedded/result,html,js,css" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

src/v2/examples/todomvc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: TodoMVC
33
type: examples
4-
order: 9
4+
order: 11
55
---
66

77
> Ceci est une spécification pleinement valide pour une implémentation TodoMVC en moins de 120 lignes effectives (excluant les commentaires et sauts de ligne).

src/v2/guide/class-and-style.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,16 @@ La syntaxe tableau pour `v-bind:style` permet d'appliquer plusieurs objets de st
191191

192192
### Préfixage automatique
193193

194-
Quand vous utilisez une propriété CSS qui nécessite un préfixe vendeur dans `v-bind:style`, par exemple `transform`, Vue le détectera automatiquement, et ajoutera les préfixes appropriés aux styles appliqués.
194+
Quand vous utilisez une propriété CSS qui nécessite un [préfixe vendeur](https://developer.mozilla.org/fr/docs/Glossaire/Pr%C3%A9fixe_Vendeur) dans `v-bind:style`, par exemple `transform`, Vue le détectera automatiquement, et ajoutera les préfixes appropriés aux styles appliqués.
195+
196+
### Valeurs multiples
197+
198+
> 2.3.0+
199+
200+
Introduit avec la 2.3, vous pouvez fournir de multiples valeurs de préfixes à une propriété style, par exemple :
201+
202+
``` html
203+
<div v-bind:style="{ display: ['-webkit-box', '-ms-flexbox', 'flex'] }">
204+
```
205+
206+
This will only render the last value in the array which the browser supports. In this example, it will render `display: flex` for browsers that support the unprefixed version of flexbox.

0 commit comments

Comments
 (0)