Skip to content

Conversation

@buckle2000
Copy link
Contributor

详细介绍 payload of context

详细介绍 payload of context
- 类型: `{ [type: string]: Function }`

在 store 上注册 action。处理函数接受一个 `context` 对象,包含以下属性:
在 store 上注册 action。处理函数总是接受 `context` 作为第一个参数(如果定义在模块中,则为模块的局部状态),`payload` 作为第二个参数(可选)。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"(如果定义在模块中,则为模块的局部状态)"这个注释不准确,context并不是局部状态,context.state才是。底下对于context.state已有说明,所以这里不用赘述。

@buckle2000
Copy link
Contributor Author

已更改

@yyx990803 yyx990803 merged commit 9200ba2 into vuejs:dev Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants