How to ... mapActions ( 'login') inside pass parameters?
1, can be used directly in the dispatch is
this.$store.dispatch(types.Login, {reqData:userData, reqTime: timeData})
2, with the image inside mapActions then how to pass parameters actions in the request data.
Solution:
Defining a single method call it login method,
<x-button @click.native="triggerLogin">登录</x-button>
methods:{
...mapActions(['login']),
triggerLogin (){
this.login(arg1, arg2)
}
}
...mapActions([
'login'
]),