mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
refactor(editor): Migrate small components to composition API (#11509)
This commit is contained in:
@@ -1,25 +1,23 @@
|
||||
<script lang="ts">
|
||||
import type { PropType } from 'vue';
|
||||
import { defineComponent } from 'vue';
|
||||
<script setup lang="ts">
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { mapStores } from 'pinia';
|
||||
import type { ModalKey } from '@/Interface';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ModalRoot',
|
||||
props: {
|
||||
name: {
|
||||
type: String as PropType<ModalKey>,
|
||||
required: true,
|
||||
},
|
||||
keepAlive: {
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useUIStore),
|
||||
},
|
||||
});
|
||||
defineProps<{
|
||||
name: string;
|
||||
keepAlive?: boolean;
|
||||
}>();
|
||||
|
||||
defineSlots<{
|
||||
default: {
|
||||
modalName: string;
|
||||
active: boolean;
|
||||
open: boolean;
|
||||
activeId: string;
|
||||
mode: string;
|
||||
data: Record<string, unknown>;
|
||||
};
|
||||
}>();
|
||||
|
||||
const uiStore = useUIStore();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user