Skip to content

Instantly share code, notes, and snippets.

@AndrejsAbrickis
Created August 27, 2019 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrejsAbrickis/dc61faa9b01e8850d63e44f13815de09 to your computer and use it in GitHub Desktop.
Save AndrejsAbrickis/dc61faa9b01e8850d63e44f13815de09 to your computer and use it in GitHub Desktop.
<template>
<button type="button" @click="handleClick">{{ label }}</button>
</template>
<script>
export default {
name: "ButtonIncrease",
props: {
count: Number,
label: String
},
methods: {
handleClick() {
this.$emit("buttonClicked", {
label: this.label,
count: this.count++
});
}
}
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment