Default slot content...
Closed jrean closed 1 year ago
Actually I just found. If it can be useful for somebody:
BaseModal.vue
:
<template>
<VueFinalModal>
<slot />
</VueFinalModal>
</template>
- Create the first (default) modal template `DefaultModal.vue`:
- Create the first modal `Foo.vue`:
Default slot content...
Then:
const { open } = useModal({ component: BaseModal, attrs: { }, slots: { default: useModalSlot({ component: Foo, attrs: { } }), }, })
Hi,
I'm trying to define a "DefaultModal" component including different slots. Then I want to create another component that will be injected into the "DefaultModal".. I tried the following:
Then
DefaultModal.vue
:Then
Foo.vue
:It's obviously not working. Is it even possible? If yes, what am I missing? Thxs