This commit is contained in:
abearxiong committed 2025-11-25 23:19:56 +08:00
1 parent a05ea0f7eb
commit d14d807aec
10 files changed
+1669 -190

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
<script setup lang="ts">
import { ref } from 'vue'
const props = defineProps({
count: {
default: 0,
},
})
const counter = ref(props.count)
</script>
<template>
<div class="flex w-min border border-main rounded-md">
<button
class="border-r border-main p-2 font-mono outline-none hover:bg-gray-400 hover:bg-opacity-20"
@click="counter -= 1"
>
-
</button>
<span class="m-auto p-2">{{ counter }}</span>
<button
class="border-l border-main p-2 font-mono outline-none hover:bg-gray-400 hover:bg-opacity-20"
@click="counter += 1"
>
+
</button>
</div>
</template>
+10
View File
@@ -0,0 +1,10 @@
---
import Html from '@/components/html.astro';
import Counter from '@/components/vue/Counter.vue';
---
<Html>
<main>
<Counter count={10} client:only/>
</main>
</Html>