Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add slots support #9

Open
yariksav opened this issue Apr 9, 2022 · 0 comments
Open

Add slots support #9

yariksav opened this issue Apr 9, 2022 · 0 comments

Comments

@yariksav
Copy link

yariksav commented Apr 9, 2022

Hi, @mattelen ! Thnak you for component and your work!

Just one feature request - to add slots support
at row

return h(dynamic, {...finalProps});

change to

return h(dynamic, {...finalProps}, this.$slots);

Motivation

Than we can use component like

    <VRuntimeTemplate
      :template="template"
    >
      Some slot data
      <div slot="named">Some named slot data</div>
    </VRuntimeTemplate>

where the template is like

<div>
    Some template data
    <slot />
    <slot name="named" />
</div>

Result will be

 <div>
    Some template data
    Some slot data
    <div>Some named slot data</div>
</div>
@mattelen mattelen assigned mattelen and unassigned mattelen Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants