|
@@ -3,6 +3,7 @@ import { computed, ref } from 'vue'
|
|
|
import { useVueFlowContext } from '../../../hooks/useVueFlowContext'
|
|
import { useVueFlowContext } from '../../../hooks/useVueFlowContext'
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
const props = defineProps<{
|
|
|
|
|
+ id: string
|
|
|
nodeId?: string
|
|
nodeId?: string
|
|
|
position: string
|
|
position: string
|
|
|
type: 'source' | 'target'
|
|
type: 'source' | 'target'
|
|
@@ -20,7 +21,7 @@ const shouldShowAddAction = computed(() => props.type === 'source' && props.show
|
|
|
const isConnecting = computed(
|
|
const isConnecting = computed(
|
|
|
() =>
|
|
() =>
|
|
|
vueFlowContext.connectingHandle.value &&
|
|
vueFlowContext.connectingHandle.value &&
|
|
|
- vueFlowContext.connectingHandle.value?.nodeId === props.nodeId
|
|
|
|
|
|
|
+ vueFlowContext.connectingHandle.value?.handleId === props.id
|
|
|
)
|
|
)
|
|
|
const isHovered = ref(false)
|
|
const isHovered = ref(false)
|
|
|
|
|
|
|
@@ -72,7 +73,9 @@ const onAdd = (event: MouseEvent) => {
|
|
|
</svg>
|
|
</svg>
|
|
|
</Transition>
|
|
</Transition>
|
|
|
|
|
|
|
|
- <div v-if="label" class="w-max ml-8px text-12px text-#666" :style="labelStyle">{{ label }}</div>
|
|
|
|
|
|
|
+ <div v-if="label" class="w-max ml-8px text-12px text-#666 bg-#f5f5f5" :style="labelStyle">
|
|
|
|
|
+ {{ label }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|