📜  vuex 调度是一个承诺 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:07.035000             🧑  作者: Mango

代码示例1
actions in Vuex are asynchronous. The only way to let the
calling function (initiator of action) to know that an
action is complete - is by returning a Promise and resolving it later.

Here is an example: myAction returns a Promise, makes a http
call and resolves or rejects the Promise later - all asynchronously