Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1048: use slotKey prop for markdown slots #1054

Merged
merged 1 commit into from
Nov 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@vuepress/core/lib/app/components/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
class: [data.class, data.staticClass],
style: data.style,
props: {
slotKey: props.slot || 'default'
slotKey: props.slotKey || 'default'
}
})
}
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/docs/guide/markdown-slot.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Markdown Slot is to solve this kind of problem.
You can define a named markdown slot through the following markdown syntax:

``` md
::: slot [$name]
::: slot name

:::
```

Use the `Content` component to use the slot in the layout component:

``` vue
<Content slot="$name"/>
<Content slot-key="name"/>
```

## Default Slot Content
Expand Down