Skip to content

Commit

Permalink
docs: add multiple slots example (#2619)
Browse files Browse the repository at this point in the history
  • Loading branch information
RollingTL committed Apr 23, 2024
1 parent e1fe75a commit b93bf93
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/content/4.components/1.content-doc.md
Expand Up @@ -95,3 +95,23 @@ The `empty` slot can be used to display a default content before rendering the d
</main>
</template>
```

### Slots

```html [pages/[...slug\\].vue]
<template>
<main>
<ContentDoc>
<template v-slot="{ doc }">
<article>
<h1>{{ doc.title }}</h1>
<ContentRenderer :value="doc" />
</article>
</template>
<template #not-found>
<h1>Document not found</h1>
</template>
</ContentDoc>
</main>
</template>
```

0 comments on commit b93bf93

Please sign in to comment.