Files
urbanLifeline/dify/web/app/components/workflow/nodes/data-source/utils.ts

12 lines
462 B
TypeScript
Raw Normal View History

2025-12-01 17:21:38 +08:00
import { PipelineInputVarType } from '@/models/pipeline'
import { VarType } from '@/app/components/workflow/types'
export const inputVarTypeToVarType = (type: PipelineInputVarType): VarType => {
return ({
[PipelineInputVarType.number]: VarType.number,
[PipelineInputVarType.singleFile]: VarType.file,
[PipelineInputVarType.multiFiles]: VarType.arrayFile,
[PipelineInputVarType.checkbox]: VarType.boolean,
} as any)[type] || VarType.string
}