refactor(nodes,edges,types!): Change label-type to string | VNode | Object

This commit is contained in:
Braks
2022-04-11 11:30:10 +02:00
parent 817f69ccb5
commit 8e3fef504c
8 changed files with 18 additions and 29 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ export default {
:is-connectable="props.connectable"
:is-valid-connection="props.isValidTargetPos"
/>
<component :is="props.label.component" v-bind="props.label.props" v-if="typeof props.label !== 'string' && props.label" />
<component :is="props.label" v-if="typeof props.label !== 'string' && props.label" />
<span v-else v-html="props.label" />
<Handle
type="source"
+1 -1
View File
@@ -14,7 +14,7 @@ export default {
}
</script>
<template>
<component :is="props.label.component" v-bind="props.label.props" v-if="typeof props.label !== 'string' && props.label" />
<component :is="props.label" v-if="typeof props.label !== 'string' && props.label" />
<span v-else v-html="props.label" />
<Handle
type="source"
+1 -1
View File
@@ -14,7 +14,7 @@ export default {
}
</script>
<template>
<component :is="props.label.component" v-bind="props.label.props" v-if="typeof props.label !== 'string' && props.label" />
<component :is="props.label" v-bind="props.label" v-if="typeof props.label !== 'string' && props.label" />
<span v-else v-html="props.label" />
<Handle
type="source"