-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Cannot pass slot object into a component #10111
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
Comments
That never worked |
@posva And how can I pass slot content into the component from somewhere outside? (Dynamically add slot content) |
@eakarpov You can use a render function where you can programmatically specify slot content. |
@Justineo Please could you describe API for specifying this programmatically? |
@Justineo Thanks! Is not $scopedSlots deprecated in vue 2.6 with slot/slot-scope? |
No it's not. We'll deprecate it in v3. |
@Justineo Ok thanks. Will vue v3 be able to manage slots programmatically? |
Version
2.6.10
Reproduction link
https://codesandbox.io/embed/vue-template-qwq83
Steps to reproduce
Create a component, pass children via slots property.
What is expected?
this.$slots property contains the passed children inside the component
What is actually happening?
Passing via prop interface leads to empty object in this.$slots
Trying to use render function to pass blocks of template inside a component.
The text was updated successfully, but these errors were encountered: