1
0
ktsn 8 жил өмнө
parent
commit
3f03637fe5

+ 2 - 2
docs/fr/modules.md

@@ -57,8 +57,8 @@ De façon similaire, dans les actions du module, `context.state` exposera le sta
 const moduleA = {
   // ...
   actions: {
-    incrementIfOdd ({ state, commit }) {
-      if (state.count % 2 === 1) {
+    incrementIfOddOnRootSum ({ state, commit, rootState }) {
+      if (state.count + rootState.count % 2 === 1) {
         commit('increment')
       }
     }

+ 2 - 2
docs/ja/modules.md

@@ -57,8 +57,8 @@ const moduleA = {
 const moduleA = {
   // ...
   actions: {
-    incrementIfOdd ({ state, commit }) {
-      if (state.count % 2 === 1) {
+    incrementIfOddOnRootSum ({ state, commit, rootState }) {
+      if (state.count + rootState.count % 2 === 1) {
         commit('increment')
       }
     }

+ 2 - 2
docs/kr/modules.md

@@ -57,8 +57,8 @@ const moduleA = {
 const moduleA = {
   // ...
   actions: {
-    incrementIfOdd ({ state, commit }) {
-      if (state.count % 2 === 1) {
+    incrementIfOddOnRootSum ({ state, commit, rootState }) {
+      if (state.count + rootState.count % 2 === 1) {
         commit('increment')
       }
     }

+ 2 - 2
docs/ru/modules.md

@@ -57,8 +57,8 @@ const moduleA = {
 const moduleA = {
   // ...
   actions: {
-    incrementIfOdd ({ state, commit }) {
-      if (state.count % 2 === 1) {
+    incrementIfOddOnRootSum ({ state, commit, rootState }) {
+      if (state.count + rootState.count % 2 === 1) {
         commit('increment')
       }
     }

+ 2 - 2
docs/zh-cn/modules.md

@@ -57,8 +57,8 @@ const moduleA = {
 const moduleA = {
   // ...
   actions: {
-    incrementIfOdd ({ state, commit }) {
-      if (state.count % 2 === 1) {
+    incrementIfOddOnRootSum ({ state, commit, rootState }) {
+      if (state.count + rootState.count % 2 === 1) {
         commit('increment')
       }
     }