fix(web): if-else & question-classifier edge label bugfix

This commit is contained in:
zhaoying
2026-03-17 10:00:57 +08:00
parent 3f0e991112
commit 6b839bd5a8
2 changed files with 6 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing * @Author: ZhaoYing
* @Date: 2026-02-03 15:06:18 * @Date: 2026-02-03 15:06:18
* @Last Modified by: ZhaoYing * @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-09 13:41:19 * @Last Modified time: 2026-03-17 09:59:56
*/ */
import LoopNode from './components/Nodes/LoopNode'; import LoopNode from './components/Nodes/LoopNode';
import NormalNode from './components/Nodes/NormalNode'; import NormalNode from './components/Nodes/NormalNode';
@@ -783,7 +783,7 @@ export const graphNodeLibrary: Record<string, NodeConfig> = {
{ group: 'left' }, { group: 'left' },
...(['IF', 'ELSE'].map((text, index) => ({ ...(['IF', 'ELSE'].map((text, index) => ({
group: 'right', group: 'right',
id: `CASE${index}`, id: `CASE${index + 1}`,
args: { args: {
...portArgs, ...portArgs,
y: 30 * index + 42, y: 30 * index + 42,
@@ -803,7 +803,7 @@ export const graphNodeLibrary: Record<string, NodeConfig> = {
{ group: 'left' }, { group: 'left' },
...(['分类1', '分类2'].map((text, index) => ({ ...(['分类1', '分类2'].map((text, index) => ({
group: 'right', group: 'right',
id: `CASE${index}`, id: `CASE${index + 1}`,
args: { args: {
...portArgs, ...portArgs,
y: 30 * index + 42, y: 30 * index + 42,

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing * @Author: ZhaoYing
* @Date: 2026-02-03 15:17:48 * @Date: 2026-02-03 15:17:48
* @Last Modified by: ZhaoYing * @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-16 18:56:30 * @Last Modified time: 2026-03-17 10:00:10
*/ */
import { useRef, useEffect, useState } from 'react'; import { useRef, useEffect, useState } from 'react';
import { useParams } from 'react-router-dom'; import { useParams } from 'react-router-dom';
@@ -222,7 +222,7 @@ export const useWorkflowGraph = ({
for (let i = 0; i < totalPorts; i++) { for (let i = 0; i < totalPorts; i++) {
portItems.push({ portItems.push({
group: 'right', group: 'right',
id: `CASE${i}`, id: `CASE${i + 1}`,
args: { args: {
x: nodeWidth, x: nodeWidth,
y: 30 * i + 42, y: 30 * i + 42,
@@ -253,7 +253,7 @@ export const useWorkflowGraph = ({
config.categories.forEach((_category: any, index: number) => { config.categories.forEach((_category: any, index: number) => {
portItems.push({ portItems.push({
group: 'right', group: 'right',
id: `CASE${index}`, id: `CASE${index + 1}`,
args: { args: {
x: nodeWidth, x: nodeWidth,
y: 30 * index + 42, y: 30 * index + 42,