Nuxt/examples/with-wasm/app.vue
Anthony Fu afcaaff57d
chore(example): use @nuxt/ui for examples (#2325)
Co-authored-by: Daniel Roe <daniel@roe.dev>
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
2021-12-23 20:27:08 +01:00

15 lines
304 B
Vue

<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>
</template>