How can I upload file using vuex store on the vue component?
问题 If I using ajax in vue component like this : It works. I successfully get the file But here I want to using vuex store My pattern of vuex store like this : I change my vue component like this : <template> <div> ... </div> </template> <script> export default { methods: { submitForm() { ... formData.append('file', files) this.updateProfile({formData, reload: true}) } } } </script> In the component vue, it will call updateProfile method in modules user The modules user like this : import { set }