Created
February 14, 2018 00:04
-
-
Save danielschmitz/e3b2de42888a4b3ce485c0f354c33609 to your computer and use it in GitHub Desktop.
Adicioando os botões Save e Clear, ambos disparando eventos
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> | |
<b-message :title="title" :closable="false"> | |
<b-tag type="is-warning" v-show="message">{{message}}</b-tag> | |
<hr/> | |
<button class="button is-primary is-pulled-right" @click="$emit('save')" >Save</button> | |
<button class="button is-secondary " @click="onClearClick" >Clear</button> | |
</b-message> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: 'FormBox', | |
props: ['title', 'message'], | |
data () { | |
return { | |
} | |
}, | |
methods: { | |
onClearClick: function () { | |
this.$emit('clear') | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment