Skip to content

Make scopes available for all components in the hierarchy #5151

@johannes-z

Description

@johannes-z

Vue.js version

2.2.2

Reproduction Link

https://jsfiddle.net/6ofnoyg6/1/

What is expected?

I'd think that the templates defined in the "main" component would get passed down to all the components, including the full hierarchy. As you can see in the example, only the container has the $scopedSlots, while the #app component does not. Hence you can't overwrite slots over multiple levels, which would force you to either

  • define the templates inside container component -> lose the ability to customize the components output / you need multiple prerendered files for each customization
  • or not using the child component and instead define everything in the container component -> more unreadable, unmaintainable code.

I've also asked on gitter and stackoverflow, but didn't get any answers (so far). I think this isn't possible by design, but is this intended?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions