Skip to content

Instantly share code, notes, and snippets.

@danielschmitz
Created February 14, 2018 00:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielschmitz/2ee1ffcf8a53a50b754c7527e1536623 to your computer and use it in GitHub Desktop.
Save danielschmitz/2ee1ffcf8a53a50b754c7527e1536623 to your computer and use it in GitHub Desktop.
<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