Skip to content

Commit 1fe9f95

Browse files
authored
[zh-cn] synced from #bb76bfd to #687962b (#1045)
* [zh-cn] synced from #bb76bfd to #86677eb * [zh-cn] synced from #86677eb to #687962b
1 parent ed186b9 commit 1fe9f95

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

docs/zh-cn/actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ actions: {
158158
}
159159
```
160160

161-
最后,如果我们利用 [async / await](https://tc39.github.io/ecmascript-asyncawait/) 这个 JavaScript 即将到来的新特性,我们可以像这样组合 action:
161+
最后,如果我们利用 [async / await](https://tc39.github.io/ecmascript-asyncawait/),我们可以如下组合 action:
162162

163163
``` js
164164
// 假设 getData() 和 getOtherData() 返回的是 Promise

docs/zh-cn/api.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ const store = new Vuex.Store({ ...options })
3636

3737
``` js
3838
{
39-
state, // 等同于 store.state, 若在模块中则为局部状态
40-
rootState, // 等同于 store.state, 只存在于模块中
41-
commit, // 等同于 store.commit
42-
dispatch, // 等同于 store.dispatch
43-
getters // 等同于 store.getters
39+
state, // 等同于 `store.state`,若在模块中则为局部状态
40+
rootState, // 等同于 `store.state`,只存在于模块中
41+
commit, // 等同于 `store.commit`
42+
dispatch, // 等同于 `store.dispatch`
43+
getters, // 等同于 `store.getters`
44+
rootGetters // 等同于 `store.getters`,只存在于模块中
4445
}
4546
```
4647

docs/zh-cn/getters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ computed: {
6868
```js
6969
getters: {
7070
// ...
71-
getTodoById: (state, getters) => (id) => {
71+
getTodoById: (state) => (id) => {
7272
return state.todos.find(todo => todo.id === id)
7373
}
7474
}

0 commit comments

Comments
 (0)