mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-16 01:24:05 -08:00
25 lines
437 B
Vue
25 lines
437 B
Vue
|
<template>
|
||
|
<div
|
||
|
v-if="isOpen(name)"
|
||
|
>
|
||
|
<slot :modalName="name" :active="isActive(name)"></slot>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import Vue from "vue";
|
||
|
|
||
|
export default Vue.extend({
|
||
|
name: "ModalRoot",
|
||
|
props: ["name"],
|
||
|
methods: {
|
||
|
isActive(name: string) {
|
||
|
return this.$store.getters['ui/isModalActive'](name);
|
||
|
},
|
||
|
isOpen(name: string) {
|
||
|
return this.$store.getters['ui/isModalOpen'](name);
|
||
|
},
|
||
|
},
|
||
|
});
|
||
|
</script>
|