我用dispatch代码没问题,
methods:{
this.$store.dispatch('selectPlay', {list: this.songs, index: index})
}
但是我用mapActions就报错
methods:{
this.selectPlay({
list: this.songs,
index: index
}),
...mapActions([
'selectPlay'
])
}
请问我写的有什么问题?
尴尬,