feat: bind props to slots

* bind props to slots in edges, handle, nodes

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-18 13:40:06 +01:00
parent b2d124ef7a
commit 0be492b7c6
8 changed files with 36 additions and 8 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ const bgPadding = computed(() => [props.labelBgPadding[0], props.labelBgPadding[
:ry="props.labelBgBorderRadius"
/>
<text ref="edge-text" class="vue-flow__edge-text" :y="height / 2" dy="0.3em" :style="props.labelStyle">
<slot>
<slot v-bind="props">
<component
:is="props.label?.component"
v-if="typeof props.label !== 'string' && typeof props.label?.component !== 'undefined'"