Now I have a custom Component, and I use a custom render function:
<script>
export default {
render(h) {
return h('InnerComponent', h('div', 'My Content'))
}
}
</script>
and the InnerComponent is defined as below:
<template>
<div>
<div>Default slot: <slot></slot></div>
<div>Custom slot: <slot name="custom"></slot></div>
</div>
</template>
So the content h('div', 'My Content') was injected into the default slot, and finally rendered as below:
<div>
<div>Default slot: <div>My Content</div></div>
<div>Custom slot: </div>
</div>
So what if I want to inject that content into the custom slot? (<slot name="custom"></slot>), inside the render function, like we use as in the below template?
<template>
<InnerComponent>
<div v-slot:custom>My Content</div>
</InnerComponent>
</template>
<script>
export default {
}
</script>