mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
18 lines
347 B
Vue
18 lines
347 B
Vue
<script setup lang="ts">
|
|
import { computed, ref } from 'vue'
|
|
|
|
const times = ref(2)
|
|
const props = defineProps<{ count: number }>()
|
|
|
|
const result = computed(() => props.count * times.value)
|
|
|
|
defineExpose(props)
|
|
</script>
|
|
|
|
<template>
|
|
<div>{{ count }} x {{ times }} = {{ result }}</div>
|
|
<button @click="times += 1">
|
|
x1
|
|
</button>
|
|
</template>
|