Skip to content

Instantly share code, notes, and snippets.

@danielschmitz
Created February 14, 2018 00:10
Show Gist options
  • Save danielschmitz/9099ee35f696d0e9b0d74d194cf8231a to your computer and use it in GitHub Desktop.
Save danielschmitz/9099ee35f696d0e9b0d74d194cf8231a to your computer and use it in GitHub Desktop.
Gerenciando os eventos save e clear
<template>
<div>
Hello World
<form-box title="Hello Form Box" message="A help message" v-on:save="onSave" @clear="onClear"></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'
}
},
methods: {
onSave: function () {
alert('save')
},
onClear: function () {
alert('clear')
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment