fix(core): connection status prop as nullable
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
|
import type { Component } from 'vue'
|
||||||
import { defineComponent, h, inject } from 'vue'
|
import { defineComponent, h, inject } from 'vue'
|
||||||
|
import type { ConnectionLineProps } from '~/types'
|
||||||
import { ConnectionLineType, ConnectionMode, Position } from '~/types'
|
import { ConnectionLineType, ConnectionMode, Position } from '~/types'
|
||||||
import { getMarkerId } from '~/utils'
|
import { getMarkerId } from '~/utils'
|
||||||
import { useVueFlow } from '~/composables'
|
import { useVueFlow } from '~/composables'
|
||||||
@@ -29,7 +31,7 @@ const ConnectionLine = defineComponent({
|
|||||||
findNode,
|
findNode,
|
||||||
} = useVueFlow()
|
} = useVueFlow()
|
||||||
|
|
||||||
const connectionLineComponent = inject(Slots)?.['connection-line']
|
const connectionLineComponent = inject(Slots)?.['connection-line'] as Component<ConnectionLineProps> | undefined
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
if (!connectionStartHandle.value) {
|
if (!connectionStartHandle.value) {
|
||||||
|
|||||||
@@ -177,7 +177,6 @@ const EdgeWrapper = defineComponent({
|
|||||||
targetHandleId: edge.targetHandle,
|
targetHandleId: edge.targetHandle,
|
||||||
interactionWidth: edge.interactionWidth,
|
interactionWidth: edge.interactionWidth,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
[
|
[
|
||||||
props.updatable === 'source' || props.updatable === true
|
props.updatable === 'source' || props.updatable === true
|
||||||
? [
|
? [
|
||||||
|
|||||||
@@ -81,5 +81,5 @@ export interface ConnectionLineProps {
|
|||||||
/** marker url */
|
/** marker url */
|
||||||
markerEnd: string
|
markerEnd: string
|
||||||
/** status of the connection (valid, invalid) */
|
/** status of the connection (valid, invalid) */
|
||||||
connectionStatus: ConnectionStatus
|
connectionStatus: ConnectionStatus | null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user