mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
docs: fix data fetching example (#1615)
This commit is contained in:
parent
348c82d55a
commit
8838cc7192
@ -129,8 +129,8 @@ Using `<script setup>` is recommended, as it removes the limitation of using top
|
||||
export default defineComponent({
|
||||
async setup() {
|
||||
const [{ data: organization }, { data: repos }] = await Promise.all([
|
||||
useFetch(`https://api.github.com/orgs/nuxtjs`),
|
||||
useFetch(`https://api.github.com/orgs/nuxtjs/repos`)
|
||||
useFetch(`https://api.github.com/orgs/nuxt`),
|
||||
useFetch(`https://api.github.com/orgs/nuxt/repos`)
|
||||
])
|
||||
|
||||
return {
|
||||
@ -139,9 +139,12 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>{{ mountain.title }}</h1>
|
||||
<p>{{ mountain.description }}</p>
|
||||
<header>
|
||||
<h1>{{ organization.login }}</h1>
|
||||
<p>{{ organization.description }}</p>
|
||||
</header>
|
||||
</template>
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user