refactor(nodes): use plugin to import prop interface

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 419b123fee
commit 076ff4ce54
6 changed files with 68 additions and 60 deletions
+34 -8
View File
@@ -172,10 +172,6 @@ export default {
>
<slot
v-bind="{
id: node.id,
data: node.data,
type: node.type,
position: node.position,
selected,
connectable: props.connectable,
sourcePosition: node.sourcePosition,
@@ -183,15 +179,28 @@ export default {
dragging: node.dragging,
isValidTargetPos: node.isValidTargetPos,
isValidSourcePos: node.isValidSourcePos,
label: node.label,
class: node.class,
style: node.style,
hidden: node.hidden,
id: node.id,
type: node.type,
data: node.data,
dragging: node.dragging,
handleBounds: node.handleBounds,
parentNode: node.parentNode,
isParent: node.isParent,
computedPosition: node.computedPosition,
position: node.position,
draggable: props.draggable,
selectable: props.selectable,
children: node.children,
dimensions: node.dimensions,
}"
>
<component
:is="props.component ?? node.type"
v-bind="{
id: node.id,
data: node.data,
type: node.type,
position: node.position,
selected,
connectable: props.connectable,
sourcePosition: node.sourcePosition,
@@ -199,6 +208,23 @@ export default {
dragging: node.dragging,
isValidTargetPos: node.isValidTargetPos,
isValidSourcePos: node.isValidSourcePos,
label: node.label,
class: node.class,
style: node.style,
hidden: node.hidden,
id: node.id,
type: node.type,
data: node.data,
dragging: node.dragging,
handleBounds: node.handleBounds,
parentNode: node.parentNode,
isParent: node.isParent,
computedPosition: node.computedPosition,
position: node.position,
draggable: props.draggable,
selectable: props.selectable,
children: node.children,
dimensions: node.dimensions,
}"
/>
</slot>