Skip to content

Instantly share code, notes, and snippets.

@nandomoreirame
Created September 3, 2019 21:19
Show Gist options
  • Save nandomoreirame/bf89cfbecfc0258c9b83fc2bfedbbaa8 to your computer and use it in GitHub Desktop.
Save nandomoreirame/bf89cfbecfc0258c9b83fc2bfedbbaa8 to your computer and use it in GitHub Desktop.
const form = {
name: '',
email: '',
phone: '',
message: ''
}
export default {
data: () => ({
form
}),
validations: {
form: {
/// ... validations here
}
},
computed: {
/// ... computed here
},
methods: {
sendContactForm (e) {
/// ... send form here
},
resetContactForm () {
this.form = form // set empty const form here
this.$v.$reset()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment