pengzhanbo 0fd6cac574
refactor(theme): improve types and flat config (#524)
* refactor(theme): improve types
2025-03-16 02:29:30 +08:00

19 lines
408 B
TypeScript

import { defineComponent, h, ref } from 'vue'
import styles from './Counter.module.css'
export default defineComponent({
setup() {
const count = ref(0)
return () => h('div', {
class: 'counter',
}, [
h('p', `计数器:${count.value}`),
h('button', {
type: 'button',
class: styles.btn,
onClick: () => count.value += 1,
}, '+ 1'),
])
},
})