Is it possible component slot's input pass to child slot in Render? #10137
-
Hi, I have a component named 'ABC'
And for some reason(defineCustomElement)
And I use 'OUTER' component this way
But I can't render slot's content. Additional InforamtionI want to use ABC Component as a web component.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
u must pass context to h.
? looks awful |
Beta Was this translation helpful? Give feedback.
-
You should pass the slots to the third parameters of const OUTER = defineCustomElement({
styles: style,
props: ABC.props,
emits: ABC.emits,
template: {},
setup(props, context) {
const app = createApp();
app.use(plugins);
const inst = getCurrentInstance();
Object.assign(inst.appContext, app._context);
Object.assign(inst.provides, app._context.provides);
return () => h(ABC , ...props, context.slots);
}
} |
Beta Was this translation helpful? Give feedback.
You should pass the slots to the third parameters of
h
.