Nuxt/examples/with-wasm/app.vue

15 lines
304 B
Vue
Raw Normal View History

2021-11-21 15:58:47 +00:00
<script setup>
const a = ref(100)
const b = ref(250)
const { data } = await useAsyncData('sum',
() => $fetch('/api/sum', { params: { a: a.value, b: b.value } })
)
</script>
<template>
<NuxtExampleLayout example="with-wasm">
{{ a }} + {{ b }} = {{ data.sum }}
</NuxtExampleLayout>
2021-11-21 15:58:47 +00:00
</template>