问题:
I have the following setup for my actions:我的操作有以下设置:
get1: ({commit}) => {
//things
this.get2(); //this is my question!
},
get2: ({commit}) => {
//things
},
I want to be able to call one action from within another, so in this example I want to be able to call get2()
from within get1()
.我希望能够从另一个内部调用一个操作,因此在本示例中,我希望能够从get2()
内部调用get2()
get1()
。 Is this possible, and if so, how can I do it?这可能吗,如果可以,我该怎么做?
解决方案:
参考一: https://en.stackoom.com/question/36NPa参考二: https://stackoom.com/question/36NPa