Closed
Description
What problem does this feature solve?
slot-scope
can be set on a component that's a child of the component that defines the scoped slot.
<vue-parent>
<vue-child slot-scope=props>
{{ props.value }}
</vue-child>
</vue-parent>
But it fails when it's set on the defining component itself. If there's only a default scoped slot then setting it on the parent should be allowed, because it would remove an unnecessary pair of tags in some cases and make the templates cleaner.
But mainly it's confusing and inconsistent to get an error that props
isn't defined in the code below but not in the code above.
What does the proposed API look like?
<vue-parent slot-scope=props>
<vue-child>
{{ props.value }}
</vue-child>
</vue-parent>