You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Don’t return the data from the action. Your mutation saves it in the store’s state, so that’s eh ew you ago of get it from.
2. No need to wrap axios in a Promise, axios returns a promise itself already.
一次性调用多个dispatch,等所有的dispatch返回数据,执行callback
Promise.all([this.$store.dispatch('A'),this.$store.dispatch('B')]).then(([aResult,bResult])=>{// 讨论 dispatch中是否返回数据??// do something})
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: