refactor(types)!: Remove ElementId type

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 fe0eeaeae9
commit f00f34d84b
28 changed files with 99 additions and 150 deletions
+2 -16
View File
@@ -4,12 +4,7 @@ import { CSSProperties } from 'vue'
interface EdgeTextProps {
x: number
y: number
label?:
| string
| {
component: any
props?: Record<string, any> & Partial<EdgeTextProps>
}
label?: string
labelStyle?: CSSProperties
labelShowBg?: boolean
labelBgStyle?: CSSProperties
@@ -48,16 +43,7 @@ export default {
:ry="props.labelBgBorderRadius"
/>
<text ref="edge-text" class="vue-flow__edge-text" :y="height / 2" dy="0.3em" :style="props.labelStyle">
<slot v-bind="props">
<component
:is="props.label?.component"
v-if="typeof props.label !== 'string' && typeof props.label?.component !== 'undefined'"
v-bind="{ ...props, ...props.label?.props, width, height, x, y }"
/>
<template v-else v-html="props.label">
{{ props.label }}
</template>
</slot>
{{ props.label }}
</text>
</g>
</template>