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

Markdown slot does not work #1048

Closed
1 task done
georeth opened this issue Nov 27, 2018 · 0 comments · Fixed by #1054
Closed
1 task done

Markdown slot does not work #1048

georeth opened this issue Nov 27, 2018 · 0 comments · Fixed by #1054
Labels
type: bug Something isn't working

Comments

@georeth
Copy link

georeth commented Nov 27, 2018

  • I confirm that this is a issue rather than a question.

Bug report

I cannot render named slots by <Content slot="$name">. The resulting HTML is always the default one.
Moreover, the document is inconsistent: both <Content slot="$name"> and <Content slot-key="$name"> appears in doc, but none of them works.

Version

1.0.0-alpha.24

Steps to reproduce

I follow the guide (https://vuepress.vuejs.org/guide/markdown-slot.html#example) to play with markdown slots.

This is the repo I used to reproduce the bug: https://github.com/georeth/vp-bugreport

What is expected?

Render the following HTML:

<div>
<header><div class="content header"><h1>This is a header slot</h1></div></header>
<div class="content default"><p>Default Slot</p></div></div>

What is actually happening?

Render the following HTML(https://github.com/georeth/vp-bugreport/blob/master/.vuepress/dist/index.html):

<div>
<header><div class="content default"><p>Default Slot</p></div></header>
<div class="content default"><p>Default Slot</p></div></div>

Note that the default slot appears twice.

Other relevant information

  • Your OS: Ubuntu 18.04
  • Node.js version: v8.10.0
  • Browser version: Google Chrome 70.0.3538.77
  • Is this a global or local install? global install (yarn global add)
  • Which package manager did you use for the install? yarn
ulivz pushed a commit that referenced this issue Nov 29, 2018
It's because we didn't read slotKey prop at Content component
This commit also updated the documentation.
@ulivz ulivz added the type: bug Something isn't working label Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants