Heim > Fragen und Antworten > Hauptteil
Offizielles Beispiel
function fetchItem (store) {
return store.dispatch('FETCH_ITEMS', {
ids: [store.state.route.params.id]
})
}
Warum nicht einfach Folgendes verwenden:
function fetchItem (store) {
//发起http请求
axios({url:**})....
}