Created
September 3, 2019 21:19
-
-
Save nandomoreirame/bf89cfbecfc0258c9b83fc2bfedbbaa8 to your computer and use it in GitHub Desktop.
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
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