mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-03 20:51:58 +00:00
Support display of multitype slots (#7457)
Example with forcibly modified types for testing <img width="736" height="425" alt="image" src="https://github.com/user-attachments/assets/e885a7d0-5946-41be-b9b4-b9b195f50c92" /> Vue mode doesn't currently seem to display optional inputs, but the SVGs here include support for being made hollow with `--shape: url(#hollow)` <img width="765" height="360" alt="image" src="https://github.com/user-attachments/assets/0ea57179-99a4-4001-aa18-856e172287c0" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7457-Support-display-of-multitype-slots-2c86d73d3650818594afd988e73827e3) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -20,13 +20,13 @@
|
||||
<!-- Connection Dot -->
|
||||
<SlotConnectionDot
|
||||
ref="connectionDotRef"
|
||||
:color="slotColor"
|
||||
:class="
|
||||
cn(
|
||||
'-translate-x-1/2 w-3',
|
||||
hasSlotError && 'ring-2 ring-error ring-offset-0 rounded-full'
|
||||
)
|
||||
"
|
||||
:slot-data
|
||||
@click="onClick"
|
||||
@dblclick="onDoubleClick"
|
||||
@pointerdown="onPointerDown"
|
||||
@@ -54,7 +54,6 @@ import { computed, onErrorCaptured, ref, watchEffect } from 'vue'
|
||||
import type { ComponentPublicInstance } from 'vue'
|
||||
|
||||
import { useErrorHandling } from '@/composables/useErrorHandling'
|
||||
import { getSlotColor } from '@/constants/slotColors'
|
||||
import type { INodeSlot } from '@/lib/litegraph/src/litegraph'
|
||||
import { useSlotLinkDragUIState } from '@/renderer/core/canvas/links/slotLinkDragUIState'
|
||||
import { getSlotKey } from '@/renderer/core/layout/slots/slotIdentifier'
|
||||
@@ -111,13 +110,6 @@ onErrorCaptured((error) => {
|
||||
return false
|
||||
})
|
||||
|
||||
const slotColor = computed(() => {
|
||||
if (hasSlotError.value) {
|
||||
return 'var(--color-error)'
|
||||
}
|
||||
return getSlotColor(props.slotData.type)
|
||||
})
|
||||
|
||||
const { state: dragState } = useSlotLinkDragUIState()
|
||||
const slotKey = computed(() =>
|
||||
getSlotKey(props.nodeId ?? '', props.index, true)
|
||||
|
||||
Reference in New Issue
Block a user