Skip to content

Is it possible component slot's input pass to child slot in Render? #10137

Discussion options

You must be logged in to vote

You should pass the slots to the third parameters of h.

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);
    }
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by east-rain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants