Closed Th3lios closed 10 months ago
@Th3lios
useModal()
can only define one modal each time, so you have to execute useModal()
multiple times if you want to create multiple modals.
import { InsuranceModal, ConsumerModal } from './components/modals';
const modals = {
InsuranceModal,
ConsumerModal
};
function showModalByName (modalName) {
const { open } = useModal({
component: modals[modalName],
attrs: {
onHide {
close()
}
}
});
open()
}
Hello, I am trying to display multiple modals on a single page using the useModal hook in Vue.js. However, I have not been able to get it to work properly.
Here is what I have tried so far:
However, this code only displays the backdrop and not the actual modal.
Can anyone suggest a solution to this issue? I have not been able to find this specific case in the documentation. Thank you!