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

How to use named slots with v-slot #18

Open
sandra0503 opened this issue Jul 10, 2023 · 0 comments
Open

How to use named slots with v-slot #18

sandra0503 opened this issue Jul 10, 2023 · 0 comments

Comments

@sandra0503
Copy link

sandra0503 commented Jul 10, 2023

Hi there, I'm struggling to use the unified slot syntax in Vue 2.7. Reference usage here

Child component:

  setup(props, { slots }) {
    return () => <div>{slots.header}</div>
  },

Parent component:

<Child>
{{
  header: () => {
    return <div>My header</div>
  },
}}
</Child>

or

<Child v-slots={{ header: () => 'My header' }}></Child>

Is this supported?

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

1 participant