-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
When multiple pop-up modal are opened at the same time, how to ensure that only one is displayed at a time and the one behind it is closed? #121
Comments
Hi! |
There is another question, Can delete specified modal, for example: |
@a982246809 I'll think about how to do this more beautifully.
const modal1 = await pushModal(1);
const modal2 = await pushModal(2);
const modal3 = await pushModal(3);
modal2.close();
const queue = getQueueByNamespace();
queue.splice(1, 1); |
Regarding the top question, I will try to quickly outline the functionality. Now in the configuration it will be possible to set the ability to hide modal windows and display only the last one. |
This method works. It would be great if there is a store key in ModalObject. I can delete the specified modal in the following way. |
Yes, it would be cool if you could add a switching transition animation |
@a982246809 import {config} from "jenesius-vue-modal";
config({
singleShow: true
}) Docs about this option. |
Regarding the second problem: there is no solution yet. However, I remembered another way. import {pushModal, closeById} from "jenesius-vue-modal"
await pushModal(Modal);
const modal = await pushModal(Modal);
await pushModal(Modal);
.
.
.
closeById(modal.id); |
Sometimes getting a modal object in different files can be difficult. |
This option works best for individual Modal and seems to be necessary in some situations, such as: |
When multiple pop-up modal are opened at the same time, how to ensure that only one is displayed at a time and the one behind it is closed?
同时打开多个弹窗时 , 怎么确保一次只显示一个 , 关闭一个在显示后面的一个
example:
pushModal(1) pushModal(2) pushModal(3)
At first, only 3 is displayed. When 3 is turned off, 2 is displayed, and then 1 is displayed.
一开始只显示3 , 当关闭3后再显示2, 再1
The text was updated successfully, but these errors were encountered: