dify
This commit is contained in:
11
dify/web/app/components/workflow/nodes/data-source/utils.ts
Normal file
11
dify/web/app/components/workflow/nodes/data-source/utils.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user