Skip to content

Commit b39c97c

Browse files
Jinjiangktsn
authored andcommitted
docs(zh): updated (#1614)
1 parent 7ca8e62 commit b39c97c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: docs/zh/guide/state.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Vuex 使用**单一状态树**——是的,用一个对象就包含了全部
88

99
单状态树和模块化并不冲突——在后面的章节里我们会讨论如何将状态和状态变更事件分布到各个子模块中。
1010

11+
存储在 Vuex 中的数据和 Vue 实例中的 `data` 遵循相同的规则,例如状态对象必须是纯粹 (plain) 的。**参考:**[Vue#data](https://cn.vuejs.org/v2/api/#data)
12+
1113
### 在 Vue 组件中获得 Vuex 状态
1214

1315
那么我们如何在 Vue 组件中展示状态呢?由于 Vuex 的状态存储是响应式的,从 store 实例中读取状态最简单的方法就是在[计算属性](https://cn.vuejs.org/guide/computed.html)中返回某个状态:

0 commit comments

Comments
 (0)