From 77950e48c76f4a3b29d01831d43039caba29888a Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 18 十一月 2025 14:12:42 +0800
Subject: [PATCH] 修改
---
app/components/workflow/nodes/question-classifier/components/class-list.tsx | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/app/components/workflow/nodes/question-classifier/components/class-list.tsx b/app/components/workflow/nodes/question-classifier/components/class-list.tsx
index f152917..e23c42b 100644
--- a/app/components/workflow/nodes/question-classifier/components/class-list.tsx
+++ b/app/components/workflow/nodes/question-classifier/components/class-list.tsx
@@ -7,24 +7,21 @@
import AddButton from '../../_base/components/add-button'
import Item from './class-item'
import type { Topic } from '@/app/components/workflow/nodes/question-classifier/types'
-import type { ValueSelector, Var } from '@/app/components/workflow/types'
const i18nPrefix = 'workflow.nodes.questionClassifiers'
type Props = {
- nodeId: string
+ id: string
list: Topic[]
onChange: (list: Topic[]) => void
readonly?: boolean
- filterVar: (payload: Var, valueSelector: ValueSelector) => boolean
}
const ClassList: FC<Props> = ({
- nodeId,
+ id,
list,
onChange,
readonly,
- filterVar,
}) => {
const { t } = useTranslation()
const { handleEdgeDeleteByDeleteBranch } = useEdgesInteractions()
@@ -47,13 +44,13 @@
const handleRemoveClass = useCallback((index: number) => {
return () => {
- handleEdgeDeleteByDeleteBranch(nodeId, list[index].id)
+ handleEdgeDeleteByDeleteBranch(id, list[index].id)
const newList = produce(list, (draft) => {
draft.splice(index, 1)
})
onChange(newList)
}
- }, [list, onChange, handleEdgeDeleteByDeleteBranch, nodeId])
+ }, [list, onChange, handleEdgeDeleteByDeleteBranch, id])
// Todo Remove; edit topic name
return (
@@ -62,14 +59,12 @@
list.map((item, index) => {
return (
<Item
- nodeId={nodeId}
- key={list[index].id}
+ key={index}
payload={item}
onChange={handleClassChange(index)}
onRemove={handleRemoveClass(index)}
index={index + 1}
readonly={readonly}
- filterVar={filterVar}
/>
)
})
--
Gitblit v1.8.0