Open
Description
What problem does this feature solve?
The following is not possible if the my-modal
component has transitions.
<my-modal>
<template #default>
<router-view>
</template>
<template #footer>
<router-view name="footer">
</template>
</my-modal>
If there's no footer
slot, we can of course use the pattern suggested in the Vue Router docs and use router-view
's slot props:
<router-view #default="{ Component }">
<my-modal>
<template #default>
<component :is="Component" />
</template>
</my-modal>
</router-view>
But then there's no (apparent) way to solve this usecase for the footer
slot.
What does the proposed API look like?
Whatever is most practical.
Provide all named views on the main router-view:
<router-view #default="{ Component, Components }">
<component :is="Component" />
<component :is="Components.Footer" />
</router-view>
Or enable nested router-views
to work with named routes? (This is the solution the Vue Discord chat thought was working today for this problem)