ModalManager.vue 597 B

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <div>
  3. <div v-for="activeModalUuid in activeModals" :key="activeModalUuid">
  4. <edit-user
  5. v-if="modalMap[activeModalUuid] === 'editUser'"
  6. :modal-uuid="activeModalUuid"
  7. />
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. import { mapState } from "vuex";
  13. import { defineAsyncComponent } from "vue";
  14. export default {
  15. components: {
  16. EditUser: defineAsyncComponent(() =>
  17. import("@/components/modals/EditUser.vue")
  18. )
  19. },
  20. computed: {
  21. ...mapState("modalVisibility", {
  22. activeModals: state => state.new.activeModals,
  23. modalMap: state => state.new.modalMap
  24. })
  25. }
  26. };
  27. </script>