瀏覽代碼

fix: Boolean type control is not displayed (#25031)

Co-authored-by: WTW0313 <twwu@dify.ai>
tags/1.8.1
17hz 1 月之前
父節點
當前提交
a7627882a7
沒有連結到貢獻者的電子郵件帳戶。

+ 1
- 1
web/app/components/header/account-setting/model-provider-page/declarations.ts 查看文件

@@ -14,7 +14,7 @@ export enum FormTypeEnum {
secretInput = 'secret-input',
select = 'select',
radio = 'radio',
boolean = 'boolean',
boolean = 'checkbox',
files = 'files',
file = 'file',
modelSelector = 'model-selector',

+ 4
- 4
web/app/components/workflow/nodes/_base/components/form-input-item.tsx 查看文件

@@ -90,8 +90,8 @@ const FormInputItem: FC<Props> = ({
// return VarType.appSelector
// else if (isModelSelector)
// return VarType.modelSelector
// else if (isBoolean)
// return VarType.boolean
else if (isBoolean)
return VarType.boolean
else if (isObject)
return VarType.object
else if (isArray)
@@ -183,7 +183,7 @@ const FormInputItem: FC<Props> = ({
return (
<div className={cn('gap-1', !(isShowJSONEditor && isConstant) && 'flex')}>
{showTypeSwitch && (
<FormInputTypeSwitch value={varInput?.type || VarKindType.constant} onChange={handleTypeChange}/>
<FormInputTypeSwitch value={varInput?.type || VarKindType.constant} onChange={handleTypeChange} />
)}
{isString && (
<MixedVariableTextInput
@@ -203,7 +203,7 @@ const FormInputItem: FC<Props> = ({
placeholder={placeholder?.[language] || placeholder?.en_US}
/>
)}
{isBoolean && (
{isBoolean && isConstant && (
<FormInputBoolean
value={varInput?.value as boolean}
onChange={handleValueChange}

Loading…
取消
儲存