mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 01:53:55 +00:00
afcaaff57d
Co-authored-by: Daniel Roe <daniel@roe.dev> Co-authored-by: Pooya Parsa <pyapar@gmail.com>
15 lines
304 B
Vue
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>
|