vite-plugin-vue2-jsx
vite-plugin-vue2-jsx copied to clipboard
How to use named slots with v-slot
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?