-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Imagine I have a main-view
component:
<template>
<header>
<slot name="header">
<default-header></default-header>
</sloot>
</header>
<main class="content-container">
<slot name="content">
<h1>404</h1>
<p>There is no content. Sorry!</p>
</slot>
</main>
</template>
And I need to dynamically switch slots from the other components.
In that case my App component should look like:
<template>
<main-view>
<component :is="currentView"></component>
</main-view>
</template>
<script>
export default {
data {
currentView: 'index'
}
}
</script>
And index component:
<template>
<div slot="content">
...
</div>
<template>
For now it is possible to use only one content insertion point. So named slots from nested component are not supported. My suggestion is to allow (some-way) to export components slots to the parent component.
What are your thought on this?
Metadata
Metadata
Assignees
Labels
No labels