Skip to content

Commit 779d967

Browse files
szu-beektsn
authored andcommitted
Update state.md (#822)
翻译存在语法错误
1 parent feeae39 commit 779d967

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/zh-cn/state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const Counter = {
2424

2525
每当 `store.state.count` 变化的时候, 都会重新求取计算属性,并且触发更新相关联的 DOM。
2626

27-
然而,这种模式导致组件依赖的全局状态单例。在模块化的构建系统中,在每个需要使用 state 的组件中需要频繁地导入,并且在测试组件时需要模拟状态。
27+
然而,这种模式导致组件依赖全局状态单例。在模块化的构建系统中,在每个需要使用 state 的组件中需要频繁地导入,并且在测试组件时需要模拟状态。
2828

2929
Vuex 通过 `store` 选项,提供了一种机制将状态从根组件『注入』到每一个子组件中(需调用 `Vue.use(Vuex)`):
3030

0 commit comments

Comments
 (0)