ff-admin/src/components/Modal.vue

33 lines
735 B
Vue
Raw Normal View History

2024-08-25 13:37:23 +02:00
<template>
<div
ref="contextMenu"
class="absolute inset-0 w-full h-full flex justify-center items-center bg-black/50 select-none z-50 p-2"
v-show="show"
@contextmenu.prevent
>
2024-09-09 13:13:45 +02:00
<!-- @click="closeModal" -->
2025-02-12 18:01:51 +01:00
<component
:is="component_ref"
:data="data"
@click.stop
class="p-4 bg-white rounded-lg max-h-[95%] overflow-y-auto"
/>
2024-08-25 13:37:23 +02:00
</div>
</template>
<script setup lang="ts">
import { mapState, mapActions } from "pinia";
2024-09-17 16:44:02 +02:00
import { useModalStore } from "@/stores/modal";
2024-08-25 13:37:23 +02:00
</script>
<script lang="ts">
export default {
computed: {
...mapState(useModalStore, ["show", "component_ref", "data"]),
},
methods: {
...mapActions(useModalStore, ["closeModal"]),
},
};
</script>