Open
Description
<script setup lang="ts">
import { reactive } from "vue"
const state = reactive({
count: 0,
})
function update(value: number) {
state.count = value;
}
</script>
<template>
<div>
<p>
<span @click="update(state.count-1)">-</span>
{{ state.count }}
<span @click="update(state.count+1)">+</span>
</p>
</div>
</template>
Activity
smallma commentedon Oct 11, 2023