mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
17 lines
355 B
Vue
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>
|