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: src/v2/api/index.md
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1452,9 +1452,9 @@ Tous les hooks du cycle de vie ont automatiquement leur contexte `this` rattach
1452
1452
1453
1453
- **Utilisation :**
1454
1454
1455
-
Defer the callback to be executed after the next DOM update cycle. Use it immediately after you've changed some data to wait for the DOM update. This is the same as the global `Vue.nextTick`, except that the callback's`this`context is automatically bound to the instance calling this method.
1455
+
Reporte l'éxécution de la fonction `callback` au prochain cycle de mise à jour du DOM. Utilisez ceci immédiatement après avoir changé des données pour attendre la mise à jour du DOM. C'est la même chose que la fonction globale `Vue.nextTick`, sauf que le contexte`this`dans la fonction `callback` est automatiquement lié à l'instance appelant cette méthode.
1456
1456
1457
-
> New in 2.1.0: returns a Promise if no callback is provided and Promise is supported in the execution environment.
1457
+
> Nouveau en 2.1.0: retourne une Promise si aucun callback n'est fourni et si les Promise sont supportés dans l'environnement d'exécution.
1458
1458
1459
1459
- **Exemple :**
1460
1460
@@ -1463,14 +1463,14 @@ Tous les hooks du cycle de vie ont automatiquement leur contexte `this` rattach
1463
1463
// ...
1464
1464
methods: {
1465
1465
// ...
1466
-
example:function () {
1467
-
//modify data
1468
-
this.message='changed'
1469
-
// DOM is not updated yet
1466
+
exemple:function () {
1467
+
//modifie des données
1468
+
this.message='changé'
1469
+
//le DOM n'est pas encore mis à jour
1470
1470
this.$nextTick(function () {
1471
-
// DOM is now updated
1472
-
// `this` is bound to the current instance
1473
-
this.doSomethingElse()
1471
+
//le DOM est maintenant à jour
1472
+
// `this` est lié à l'instance courante
1473
+
this.faireAutreChose()
1474
1474
})
1475
1475
}
1476
1476
}
@@ -1479,17 +1479,17 @@ Tous les hooks du cycle de vie ont automatiquement leur contexte `this` rattach
- [File de mise à jour asynchrone](../guide/reactivity.html#Async-Update-Queue)
1483
1483
1484
1484
<h3 id="vm-destroy">vm.$destroy()</h3>
1485
1485
1486
1486
- **Utilisation :**
1487
1487
1488
-
Completely destroy a vm. Clean up its connections with other existing vms, unbind all its directives, turn off all event listeners.
1488
+
Détruit complètement une instance de Vue `vm`. Supprime ses connexions avec d'autres instances de Vue, détache toutes ses directives, désactive tous les écouteurs d'événements.
1489
1489
1490
-
Triggers the `beforeDestroy`and`destroyed` hooks.
1490
+
Déclenche les hooks `beforeDestroy`et`destroyed`.
1491
1491
1492
-
<p class="tip">In normal use cases you shouldn't have to call this method yourself. Prefer controlling the lifecycle of child components in a data-driven fashion using `v-if`and`v-for`.</p>
1492
+
<p class="tip">Dans les cas d'utilisation normaux, vous ne devriez pas avoir à appeler cette méthode vous-même. Contrôlez plutôt le cycle de vie de vos composants enfants de manière pilotée par les données, en utilisant `v-if`et`v-for`.</p>
1493
1493
1494
1494
- **Voir aussi :** [Diagramme du Cycle de Vie](../guide/instance.html#Lifecycle-Diagram)
0 commit comments