mirror of
https://github.com/andwati/personal-website.git
synced 2026-10-18 02:32:54 +00:00
30 lines
399 B
Vue
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>
|