fix(web): 移除节点未移除节点数据
This commit is contained in:
@@ -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(() => [
|
||||
|
||||
Reference in New Issue
Block a user