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
},
})
Version
vue-final-modal: ^4.5.4 vue: ^3.4.21
Description
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 }, })