浏览代码

reflect #581 for all lang docs

ktsn 8 年之前
父节点
当前提交
3f03637fe5
共有 5 个文件被更改,包括 10 次插入10 次删除
  1. 2 2
      docs/fr/modules.md
  2. 2 2
      docs/ja/modules.md
  3. 2 2
      docs/kr/modules.md
  4. 2 2
      docs/ru/modules.md
  5. 2 2
      docs/zh-cn/modules.md

+ 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')
       }
     }