Created
July 8, 2018 13:04
-
-
Save amcsi/67ef1a690b55be156d3930dffcfda3db to your computer and use it in GitHub Desktop.
Vue Form Handling example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return { | |
methods: { | |
async submitForm() { | |
try { | |
await axios.post('...', this.data); | |
} catch (e) { | |
const handled = tryHandleFormErrors(e); | |
if (!handled) { | |
handleUnexpectedErrors(e); | |
} | |
} | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment