We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deb2059 commit acac79fCopy full SHA for acac79f
docs/zh/guide/state.md
@@ -8,6 +8,8 @@ Vuex 使用**单一状态树**——是的,用一个对象就包含了全部
8
9
单状态树和模块化并不冲突——在后面的章节里我们会讨论如何将状态和状态变更事件分布到各个子模块中。
10
11
+存储在 Vuex 中的数据和 Vue 实例中的 `data` 遵循相同的规则,例如状态对象必须是纯粹 (plain) 的。**参考:**[Vue#data](https://cn.vuejs.org/v2/api/#data)。
12
+
13
### 在 Vue 组件中获得 Vuex 状态
14
15
那么我们如何在 Vue 组件中展示状态呢?由于 Vuex 的状态存储是响应式的,从 store 实例中读取状态最简单的方法就是在[计算属性](https://cn.vuejs.org/guide/computed.html)中返回某个状态:
0 commit comments