s11e153 submitting a form

This commit is contained in:
Tyrel Souza 2018-04-19 00:13:49 -04:00
parent b843b4bfbc
commit 4426f735f8

View File

@ -111,6 +111,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3"> <div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3">
<button <button
@click.prevent="submit"
class="btn btn-primary">Submit! class="btn btn-primary">Submit!
</button> </button>
</div> </div>
@ -119,7 +120,7 @@
</form> </form>
<hr> <hr>
<div class="row"> <div class="row" v-if="isSubmitted">
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3"> <div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
@ -152,6 +153,7 @@
export default { export default {
data(){ data(){
return { return {
isSubmitted: false,
userData: { userData: {
email: '', email: '',
password: '', password: '',
@ -167,6 +169,11 @@
}, },
components:{ components:{
appSwitch: Switch, appSwitch: Switch,
},
methods:{
submit(){
this.isSubmitted = true;
}
} }
} }
</script> </script>