Преглед изворни кода

Merge pull request #110 from yanni4night/patch-1

修正mutation内操作state的行为
Evan You пре 9 година
родитељ
комит
082e319c74
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      docs/zh-cn/actions.md

+ 1 - 1
docs/zh-cn/actions.md

@@ -19,7 +19,7 @@ const store = new Vuex.Store({
   },
   mutations: {
     INCREMENT (state, x) {
-      state += x
+      state.count += x
     }
   },
   actions: {