feat(nodes): Pass node slots as injections to wrapper

* Avoids drilling slots which causes huge performance issues when 100+ nodes are present due to re-binding of props on each level
This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent b47197f498
commit 4cbdf0ccc1
6 changed files with 39 additions and 84 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { InjectionKey } from 'vue'
import { InjectionKey, Slots as TSlots } from 'vue'
import { UseVueFlow } from '~/types'
export const VueFlow: InjectionKey<UseVueFlow> = Symbol('vueFlow')
export const NodeId: InjectionKey<string> = Symbol('nodeId')
export const Slots: InjectionKey<TSlots> = Symbol('slots')