Files
personal-website/app/components/Counter.vue
T
2026-02-13 19:26:38 +03:00

30 lines
399 B
Vue

<template>
<div>
<h3>Counter: {{ count }}</h3>
<button @click="increment">
Increment
</button>
<button @click="decrement">
Decrement
</button>
</div>
</template>
<script setup lang="ts">
const count = ref(0);
const increment = () => {
count.value++;
};
const decrement = () => {
count.value--;
};
</script>
<style scoped>
button {
margin: 5px;
}
</style>