How do I get instances of slot components?
HenryOoO opened this issue · 0 comments
HenryOoO commented
Version
vue-final-modal: ^4.5.4
vue: ^3.4.21
Description
I am a vue novice, I created a public style pop-up window MyModal, inside the OK button, I want to click the OK button to get the Form inside the child component form, can this be achieved?
<script lang='ts' setup>
import Form from '@/components/Form.vue';
import MyModal from '@/components/MyModal.vue';
import { useModal } from 'vue-final-modal';
const { open, patchOptions } = useModal({
component: MyModal,
keepAlive: false,
attrs: {
title: 'my modal',
"onSave": () => {
// How do I get the value inside the form here?
}
},
slots: {
default: Form
},
})
</script>