fix(web): 移除节点未移除节点数据

This commit is contained in:
v-zhangjc9
2025-07-10 14:28:32 +08:00
parent f707a0d2b5
commit f70b3b2a32
3 changed files with 16 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
import type {NodeProps} from '@xyflow/react'
import {Tag} from 'antd'
import React, {useCallback, useEffect, useState} from 'react'
import React, {useCallback, useEffect} from 'react'
import {useContextStore} from '../store/ContextStore.ts'
import {useDataStore} from '../store/DataStore.ts'
import {useFlowStore} from '../store/FlowStore.ts'
@@ -16,7 +16,7 @@ const LlmNode = (props: NodeProps) => {
const {getData, mergeDataById, getDataById} = useDataStore()
const {getInputSchema} = useContextStore()
const [nodeData, setNodeData] = useState<any>()
const nodeData = getDataById(props.id)
useEffect(() => {
mergeDataById(
@@ -29,7 +29,6 @@ const LlmNode = (props: NodeProps) => {
},
},
)
setNodeData(getDataById(props.id))
}, [props.id])
const columnsSchema = useCallback(() => [