您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011
  1. import { PipelineInputVarType } from '@/models/pipeline'
  2. import { VarType } from '@/app/components/workflow/types'
  3. export const inputVarTypeToVarType = (type: PipelineInputVarType): VarType => {
  4. return ({
  5. [PipelineInputVarType.number]: VarType.number,
  6. [PipelineInputVarType.singleFile]: VarType.file,
  7. [PipelineInputVarType.multiFiles]: VarType.arrayFile,
  8. [PipelineInputVarType.checkbox]: VarType.boolean,
  9. } as any)[type] || VarType.string
  10. }