Jenesius / vue-modal

🖖The progressive and simple modal system for Vue.js v3
https://modal.jenesius.com
MIT License
145 stars 14 forks source link

Create multiple instances #91

Closed saleh-gholamian closed 9 months ago

saleh-gholamian commented 10 months ago

Please add this feature to be able to have multiple ModalContainer instances, or rather to have multiple ModalContainer, there are various scenarios where we need to be able to display modals in separate containers, unfortunately none of the existing libraries have such a feature.

Jenesius commented 10 months ago

Hello! Interesting offer. I need to think through the concept and implement some basic implementation. I also need to think about how modal windows in different containers will be displayed.

Thanks for the idea! In this issue I will add the implementation progress.

Or maybe divide it all into a namespace, where each container displays its own.

Jenesius commented 10 months ago

This task will be discussed here. Discussion

Jenesius commented 10 months ago

@saleh-gholamian Hello! I did a little development to implement namespace. At the moment it is at the finished draft stage. All functionality has been implemented, but I continue to test and optimize the current code.

To see the result, you need to:

  1. Clone the current repository
  2. Go to the issue_94 branch
  3. npm ci
  4. npm run serve
  5. Go to http://localhost:8080/namespace

This example is described in here.

Jenesius commented 10 months ago

Now everything inside main branch. I think I will update version tomorrow to 1.10.0. I want to test better because there are big changes involved.

anshirko commented 10 months ago

I start update docs for new options: guide-methods.md. Also, add new information about getCurrentModal

Jenesius commented 10 months ago

@saleh-gholamian Version: 1.10.0 Docs here.