diff --git a/examples/Edges/CustomEdge.vue b/examples/Edges/CustomEdge.vue
index c43f9130..93dd561c 100644
--- a/examples/Edges/CustomEdge.vue
+++ b/examples/Edges/CustomEdge.vue
@@ -31,6 +31,11 @@ const edgePath = computed(() =>
)
const markerEnd = computed(() => getMarkerEnd(props.arrowHeadType, props.markerEndId))
+
diff --git a/examples/Edges/CustomEdge2.vue b/examples/Edges/CustomEdge2.vue
index 996ba6c0..c6c30af7 100644
--- a/examples/Edges/CustomEdge2.vue
+++ b/examples/Edges/CustomEdge2.vue
@@ -16,7 +16,9 @@ interface CustomEdgeProps extends EdgeProps {
targetPosition: Position
arrowHeadType?: ArrowHeadType
markerEndId?: string
- data?: any
+ data?: {
+ text: string
+ }
}
const props = defineProps()
@@ -41,6 +43,11 @@ const center = computed(() =>
}),
)
+
-import { CSSProperties } from 'vue'
+import { Component, CSSProperties, DefineComponent } from 'vue'
import { ArrowHeadType, EdgeProps, ElementId, Position } from '../../types'
import { getCenter, getMarkerEnd, getBezierPath } from './utils'
import EdgeText from './EdgeText.vue'
@@ -19,18 +19,16 @@ interface BezierEdgeProps extends EdgeProps {
label?:
| string
| {
- component: any
- props?: any
+ component: Component | DefineComponent
+ props?: Record
}
- labelStyle?: any
+ labelStyle?: CSSProperties
labelShowBg?: boolean
- labelBgStyle?: any
+ labelBgStyle?: CSSProperties
labelBgPadding?: [number, number]
labelBgBorderRadius?: number
- style?: CSSProperties
arrowHeadType?: ArrowHeadType
markerEndId?: string
- data?: any
sourceHandleId?: ElementId
targetHandleId?: ElementId
}
@@ -58,6 +56,8 @@ const path = computed(() => {
})
const markerEnd = computed(() => getMarkerEnd(props.arrowHeadType, props.markerEndId))
+
+const attrs = useAttrs() as Record<'style', CSSProperties>
-
+
+import { Component, CSSProperties, DefineComponent } from 'vue'
import { ArrowHeadType, EdgeProps, ElementId, Position } from '../../types'
import EdgeText from './EdgeText.vue'
import { getCenter, getMarkerEnd, getSmoothStepPath } from './utils'
@@ -18,18 +19,16 @@ interface SmoothStepEdgeProps extends EdgeProps {
label?:
| string
| {
- component: any
- props?: any
+ component: Component | DefineComponent
+ props?: Record
}
- labelStyle?: any
+ labelStyle?: CSSProperties
labelShowBg?: boolean
- labelBgStyle?: any
+ labelBgStyle?: CSSProperties
labelBgPadding?: [number, number]
labelBgBorderRadius?: number
- style?: any
arrowHeadType?: ArrowHeadType
markerEndId?: string
- data?: any
borderRadius?: number
sourceHandleId?: ElementId | null
targetHandleId?: ElementId | null
@@ -60,6 +59,8 @@ const path = computed(() => {
})
const markerEnd = computed(() => getMarkerEnd(props.arrowHeadType, props.markerEndId))
+
+const attrs = useAttrs() as Record<'style', CSSProperties>
-
+
+import { Component, CSSProperties, DefineComponent } from 'vue'
import { ArrowHeadType, EdgeProps, ElementId, Position } from '../../types'
import SmoothStepEdge from './SmoothStepEdge.vue'
@@ -17,18 +18,16 @@ export interface StepEdgeProps extends EdgeProps {
label?:
| string
| {
- component: any
- props?: any
+ component: Component | DefineComponent
+ props?: Record
}
- labelStyle?: any
+ labelStyle?: CSSProperties
labelShowBg?: boolean
- labelBgStyle?: any
+ labelBgStyle?: CSSProperties
labelBgPadding?: [number, number]
labelBgBorderRadius?: number
- style?: any
arrowHeadType?: ArrowHeadType
markerEndId?: string
- data?: any
sourceHandleId?: ElementId | null
targetHandleId?: ElementId | null
}
@@ -42,9 +41,10 @@ const props = withDefaults(defineProps(), {
labelShowBg: true,
labelBgStyle: () => ({}),
})
+const attrs = useAttrs() as Record<'style', CSSProperties>
-
+
diff --git a/src/components/Edges/StraightEdge.vue b/src/components/Edges/StraightEdge.vue
index b37de6cd..418c03e4 100644
--- a/src/components/Edges/StraightEdge.vue
+++ b/src/components/Edges/StraightEdge.vue
@@ -1,4 +1,5 @@
-
+