Nuxt/test/fixtures/basic/components/SugarCounter.vue
2023-05-11 09:37:32 +01:00

17 lines
355 B
Vue

<script setup lang="ts">
const props = defineProps<{
multiplier: number
}>()
const count = $ref(12)
const doubled = $computed(() => count * props.multiplier)
</script>
<template>
<div class="sugar-counter">
Sugar Counter {{ count }} x {{ multiplier }} = {{ doubled }}
<button @click="count += 1">
Inc
</button>
</div>
</template>