chore(core): cleanup vueflow cmp

This commit is contained in:
braks
2024-02-05 07:51:12 +01:00
committed by Braks
parent 5798cc5578
commit 557a679e89
@@ -4,9 +4,11 @@ import { onUnmounted, provide } from 'vue'
import Viewport from '../Viewport/Viewport.vue'
import A11yDescriptions from '../../components/A11y/A11yDescriptions.vue'
import type { FlowEmits, FlowProps, FlowSlots, VueFlowStore } from '../../types'
import { useVueFlow, useWatchProps } from '../../composables'
import { useHooks } from '../../store'
import { Slots } from '../../context'
import { useOnInitHandler } from '../../composables/useOnInitHandler'
import { useWatchProps } from '../../composables/useWatchProps'
import { useVueFlow } from '../../composables/useVueFlow'
import { useHooks } from '../../store/hooks'
const props = withDefaults(defineProps<FlowProps>(), {
snapToGrid: undefined,
@@ -64,6 +66,8 @@ const dispose = useWatchProps({ modelValue, nodes: modelNodes, edges: modelEdges
useHooks(emit, hooks)
useOnInitHandler()
// slots will be passed via provide
// this is to avoid having to pass them down through all the components
// as that would require a lot of boilerplate and causes significant performance drops