МД
Size: a a a
МД
МД
МД
<script>
export default {
async asyncData(context) {
const id = context.params.id
try {
// Using the nuxtjs/http module here exposed via context.app
const post = await context.app.$http.$get(
`https://api.nuxtjs.dev/posts/${id}`
)
return { post }
} catch (e) {
context.error(e) // Show the nuxt error page with the thrown error
}
}
}
</script>
A

A
A
A
A
МД
A
A
N
A
V
BI
КГ
A
AS
<my-component-with-slot>
<h1>Text slot</h1>
<template #button>
<my-component-button />
</template>
</my-component-with-slot>
myComponentWithSlot.vue
<template>
<...>
<slot>
<slot name="button">
</template>