javascript - How does a method in vuex state management mutations call another fangfa? How does a method call itself to implement recursive calls?
迷茫
迷茫 2017-05-19 10:43:03
0
1
1220

Vue makes a component and wants to use vuex to manage it. But I encountered a problem. One method in mutations wants to use another method in mutations. How to achieve this?
There is also a method in mutations that wants to call itself to implement recursive calls. How to achieve this? ? ?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
迷茫

Official instructions indicate that it is more consistent to use actions~
If you want to execute another mutation in one mutation, you can also store.commit('the name of another mutation').

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template