Kaynağa Gözat

fix: 修改问题

jiaxing.liao 2 hafta önce
ebeveyn
işleme
6fd6ddd917

+ 2 - 2
apps/web/src/i18n/locales/zh-cn.ts

@@ -75,9 +75,9 @@ export default {
 				defaultValue: '默认值',
 				failBranch: '异常分支',
 				defaultValueDescription: '当发生异常时,指定默认输出内容',
-				failBranchDescription: '在画布自定义失败分支逻辑。',
+				failBranchDescription: '在画布自定义异常分支逻辑。',
 				failBranchHint:
-					'当节点发生异常时,将自动执行失败分支。失败分支允许您灵活地提供错误消息、报告、修复或跳过操作。'
+					'当节点发生异常时,将自动执行异常分支。异常分支允许您灵活地提供错误消息、报告、修复或跳过操作。'
 			},
 			varSelect: {
 				selectVariable: '选择变量',

+ 0 - 1
packages/workflow/src/components/Canvas.vue

@@ -373,7 +373,6 @@ const connectedHandle = ref<Connection>()
 
 function onConnectStart(handle: ConnectStartEvent) {
 	emit('create:connection:start', handle)
-
 	connectingHandle.value = handle
 	connectionCreated.value = false
 }

+ 1 - 0
packages/workflow/src/components/elements/handles/CanvasHandle.vue

@@ -56,6 +56,7 @@ const isConnectableEnd = computed(() => {
 			:type="type"
 			:label="label"
 			:label-style="labelStyle"
+			:id="handleId"
 			:show-add-action="type === 'source' && connectionsCount === 0"
 			@add="emit('add', { handleId, event: $event })"
 		/>

+ 5 - 2
packages/workflow/src/components/elements/handles/HandlePort.vue

@@ -3,6 +3,7 @@ import { computed, ref } from 'vue'
 import { useVueFlowContext } from '../../../hooks/useVueFlowContext'
 
 const props = defineProps<{
+	id: string
 	nodeId?: string
 	position: string
 	type: 'source' | 'target'
@@ -20,7 +21,7 @@ const shouldShowAddAction = computed(() => props.type === 'source' && props.show
 const isConnecting = computed(
 	() =>
 		vueFlowContext.connectingHandle.value &&
-		vueFlowContext.connectingHandle.value?.nodeId === props.nodeId
+		vueFlowContext.connectingHandle.value?.handleId === props.id
 )
 const isHovered = ref(false)
 
@@ -72,7 +73,9 @@ const onAdd = (event: MouseEvent) => {
 			</svg>
 		</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>
 </template>