Browse Source

docs: missing mutation in code example (#1887)

loongye 4 years ago
parent
commit
a0a7e1d638
1 changed files with 5 additions and 0 deletions
  1. 5 0
      docs/guide/index.md

+ 5 - 0
docs/guide/index.md

@@ -26,6 +26,11 @@ const store = createStore({
     return {
       count: 1
     }
+  },
+  mutations: {
+    increment (state) {
+      state.count++
+    }
   }
 })