vite-plugin-vue2-jsx icon indicating copy to clipboard operation
vite-plugin-vue2-jsx copied to clipboard

How to use named slots with v-slot

Open sandra0503 opened this issue 1 year ago • 0 comments

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?

sandra0503 avatar Jul 10 '23 15:07 sandra0503