feat: Add slots to edges and nodes
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -23,7 +23,9 @@ export default {
|
||||
</script>
|
||||
<template>
|
||||
<Handle type="target" :position="props.targetPosition" :is-connectable="props.connectable" />
|
||||
<component :is="props.data?.label" v-if="typeof props.data?.label !== 'string'" />
|
||||
<span v-else v-html="props.data?.label"></span>
|
||||
<slot>
|
||||
<component :is="props.data?.label" v-if="typeof props.data?.label !== 'string'" />
|
||||
<span v-else v-html="props.data?.label"></span>
|
||||
</slot>
|
||||
<Handle type="source" :position="props.sourcePosition" :is-connectable="props.connectable" />
|
||||
</template>
|
||||
|
||||
@@ -20,7 +20,9 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<component :is="props.data?.label" v-if="typeof props.data?.label !== 'string'" />
|
||||
<span v-else v-html="props.data?.label"></span>
|
||||
<slot>
|
||||
<component :is="props.data?.label" v-if="typeof props.data?.label !== 'string'" />
|
||||
<span v-else v-html="props.data?.label"></span>
|
||||
</slot>
|
||||
<Handle type="source" :position="props.sourcePosition" :connectable="props.connectable" />
|
||||
</template>
|
||||
|
||||
@@ -20,7 +20,9 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<component :is="props.data?.label" v-if="typeof props.data?.label !== 'string'" />
|
||||
<span v-else v-html="props.data?.label"></span>
|
||||
<slot>
|
||||
<component :is="props.data?.label" v-if="typeof props.data?.label !== 'string'" />
|
||||
<span v-else v-html="props.data?.label"></span>
|
||||
</slot>
|
||||
<Handle type="source" :position="props.targetPosition" :is-connectable="props.connectable" />
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user