Created
February 14, 2018 00:25
-
-
Save danielschmitz/2ee1ffcf8a53a50b754c7527e1536623 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
<template> | |
<div> | |
<form-box title="Hello Form Box" message="A help message" v-on:save="onSave" @clear="onClear"> | |
<b-field label="Name"> | |
<b-input v-model="name"></b-input> | |
</b-field> | |
<b-field label="Email"> | |
<b-input v-model="email"></b-input> | |
</b-field> | |
</form-box> | |
</div> | |
</template> | |
<script> | |
import FormBox from './FormBox.vue' | |
export default { | |
name: 'HelloWorld', | |
components: { | |
FormBox | |
}, | |
data () { | |
return { | |
msg: 'Welcome to Your Vue.js App', | |
name: '', | |
email: '' | |
} | |
}, | |
methods: { | |
onSave: function () { | |
console.log('Save', this.name, this.email) | |
}, | |
onClear: function () { | |
alert('clear') | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment