Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I get instances of slot components? #438

Open
HenryOoO opened this issue Mar 21, 2024 · 0 comments
Open

How do I get instances of slot components? #438

HenryOoO opened this issue Mar 21, 2024 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@HenryOoO
Copy link

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>
@HenryOoO HenryOoO added the question Further information is requested label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants