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

v-slot not used seems to exist #9452

Comments

@tcastelly
Copy link

Version

2.6.3

Reproduction link

https://jsfiddle.net/shenron/xmykud6z/29/

Steps to reproduce

I have component and sub component. I want to pass slot from the parent to a child.
In this example I have v-modal-confirm and v-modal both can display a title thanks to a prop or with slot.

In the line 2 of my html demo, I use a title prop without slot. This slot seems to be created anyway, because the default behavior to print the title in v-modal is not called.

What is expected?

The default print of the slot in the v-modal should be visible

What is actually happening?

Nothing is printed


It works with the deprecated syntax.

@tcastelly
Copy link
Author

I use this workaround: https://jsfiddle.net/shenron/xmykud6z/35/

Test the $sclopedSlots before display the slot.

@pmochine
Copy link

pmochine commented Feb 7, 2019

@tcastelly I think I had a similar issue, here is my example: https://jsfiddle.net/56e2jr79/1/

If you try the new syntax on the

//old syntax
<slot
  name="reference"
  slot="reference"
/>

with 

//new syntax
<template #reference>
 <slot
    name="reference"
  />
</template>

It wouldn't show it up...

So the last commit should fix it up? @yyx990803 (thx)

@yyx990803
Copy link
Member

@pmochine yes, I believe so.

Lostlover pushed a commit to Lostlover/vue that referenced this issue Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment