You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/advanced/transitions.md
+11-11
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
-
# Transitions (En) <br><br> *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/vue-router).*
1
+
# Les transitions
2
2
3
-
Since the`<router-view>`is essentially a dynamic component, we can apply transition effects to it the same way using the`<transition>`component:
3
+
Vu que`<router-view>`est essentiellement un composant dynamique, on peut lui appliquer certains effets de transitions en utilisant le composant`<transition>` :
4
4
5
5
```html
6
6
<transition>
7
7
<router-view></router-view>
8
8
</transition>
9
9
```
10
10
11
-
[Everything about `<transition>`](http://vuejs.org/guide/transitions.html)works the same here.
11
+
[Tout à propos de `<transition>`](http://fr.vuejs.org/v2/guide/transitions.html)fonctionne également ici de la même manière.
12
12
13
-
### Per-Route Transition
13
+
### Transition par route
14
14
15
-
The above usage will apply the same transition for all routes. If you want each route's component to have different transitions, you can instead use `<transition>`with different names inside each route component:
15
+
L'utilisation au dessus applique la même transition pour chaque route. Si vous voulez que les composants de route aient des transitions différentes, vous pouvez utiliser à la place `<transition>`avec des noms différents à l'intérieur de chaque composant de route :
16
16
17
17
```js
18
18
constFoo= {
@@ -32,20 +32,20 @@ const Bar = {
32
32
}
33
33
```
34
34
35
-
### Route-Based Dynamic Transition
35
+
#Transition dynamique basée sur la route
36
36
37
-
It is also possible to determine the transition to use dynamically based on the relationship between the target route and current route:
37
+
Il est aussi possible de déterminer la transition à utiliser en se basant sur la relation entre la route cible et la route actuelle :
38
38
39
39
```html
40
-
<!--use a dynamic transition name-->
40
+
<!--utiliser un nom de transition dynamique-->
41
41
<transition:name="transitionName">
42
42
<router-view></router-view>
43
43
</transition>
44
44
```
45
45
46
46
```js
47
-
//then, in the parent component,
48
-
//watch the $route to determine the transition to use
47
+
//et dans le composant parent,
48
+
//observer la `$route` pour déterminer la transition à utiliser
49
49
watch: {
50
50
'$route' (to, from) {
51
51
consttoDepth=to.path.split('/').length
@@ -55,4 +55,4 @@ watch: {
55
55
}
56
56
```
57
57
58
-
See full example [here](https://github.com/vuejs/vue-router/blob/dev/examples/transitions/app.js).
58
+
Voir un exemple complet [ici](https://github.com/vuejs/vue-router/blob/dev/examples/transitions/app.js).
0 commit comments