Files
light-factory-solution/solution/slides/components/Counter.vue
abearxiong fd664c018c feat: add initial Slidev presentation and demo components
- Created Slidev presentation structure with index.md and contents.md.
- Implemented footer and menu components for navigation.
- Added Markdown preview component with syntax highlighting.
- Developed HTML template for consistent page structure.
- Introduced button component with variant support.
- Added Vue counter component for interactive demos.
- Configured content collections for documentation.
- Created multiple markdown documents for demo purposes.
- Established global and theme styles for consistent UI.
- Set up TypeScript configuration for better development experience.
2026-01-01 22:23:22 +08:00

30 lines
635 B
Vue

<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>