1<template>
2 <div>
3 <button v-on:click="increment">Increment</button>
4 <button @click="decrement">Decrement</button>
5 <h4>Counter Count: {{ counter }}</h4>
6 </div>
7</template>
8
9<script>
10 export default {
11 name: 'DataEvent',
12 data: () => ({
13 counter: 0
14 }),
15 methods: {
16 increment() {
17 this.counter++
18 },
19 decrement() {
20 this.counter--
21 }
22 }
23 }
24</script>
25
26<style scoped>
27 button {
28 padding: 5px;
29 font-size: 20px;
30 margin: 10px;
31 }
32 h4 {
33 font-size: 18px;
34 }
35</style>