Skip to content

Commit 6d2e0ec

Browse files
author
Yan.Huang
committed
revise article
1 parent 8f2b747 commit 6d2e0ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/zh-cn/actions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> Vuex actions 和 Flux 中的 "action creators" 是等同的概念,但是我觉得这个定义常让人感到困惑(比如分不清 actions 和 action creators)。
44
5-
Actions 是用于分发 mutations 的函数。按照惯例,Vuex 的第一个参数是 store 实例,附加上可选的自定义参数。
5+
Actions 是用于分发 mutations 的函数。按照惯例,Vuex actions 的第一个参数是 store 实例,附加上可选的自定义参数。
66

77
``` js
88
// 最简单的 action
@@ -99,6 +99,7 @@ const vm = new Vue({
9999
}
100100
}
101101
})
102+
```
102103

103104
这样 action 就会被绑定为 `vm.plus` 而不是 `vm.increamentBy` 了。
104105

0 commit comments

Comments
 (0)