Answers for "event in buejs"

0

event in buejs

<template>
	<div>
		<button v-on:click="increment">Increment</button>
		<button @click="decrement">Decrement</button>
		<h4>Counter Count: {{ counter }}</h4>
	</div>
</template>

<script>
	export default {
		name: 'DataEvent',
		data: () => ({
			counter: 0
		}),
		methods: {
			increment() {
				this.counter++
			},
			decrement() {
				this.counter--
			}
		}
	}
</script>

<style scoped>
	button {
		padding: 5px;
		font-size: 20px;
		margin: 10px;
	}
	h4 {
		font-size: 18px;
	}
</style>
Posted by: Guest on March-14-2021

Code answers related to "event in buejs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language