mirror of
https://github.com/langgenius/dify.git
synced 2026-05-02 15:17:39 +08:00
fix: basic bool error
This commit is contained in:
parent
437729db97
commit
ca37e304cc
@ -190,7 +190,7 @@ const ConfigVar: FC<IConfigVarProps> = ({ promptVariables, readonly, onPromptVar
|
|||||||
const handleConfig = ({ key, type, index, name, config, icon, icon_background }: ExternalDataToolParams) => {
|
const handleConfig = ({ key, type, index, name, config, icon, icon_background }: ExternalDataToolParams) => {
|
||||||
// setCurrKey(key)
|
// setCurrKey(key)
|
||||||
setCurrIndex(index)
|
setCurrIndex(index)
|
||||||
if (type !== 'string' && type !== 'paragraph' && type !== 'select' && type !== 'number' && type !== 'boolean') {
|
if (type !== 'string' && type !== 'paragraph' && type !== 'select' && type !== 'number' && type !== 'checkbox') {
|
||||||
handleOpenExternalDataToolModal({ key, type, index, name, config, icon, icon_background }, promptVariables)
|
handleOpenExternalDataToolModal({ key, type, index, name, config, icon, icon_background }, promptVariables)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -110,7 +110,7 @@ const PromptValuePanel: FC<IPromptValuePanelProps> = ({
|
|||||||
className='mb-4 last-of-type:mb-0'
|
className='mb-4 last-of-type:mb-0'
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
{type !== 'boolean' && (
|
{type !== 'checkbox' && (
|
||||||
<div className='system-sm-semibold mb-1 flex h-6 items-center gap-1 text-text-secondary'>
|
<div className='system-sm-semibold mb-1 flex h-6 items-center gap-1 text-text-secondary'>
|
||||||
<div className='truncate'>{name || key}</div>
|
<div className='truncate'>{name || key}</div>
|
||||||
{!required && <span className='system-xs-regular text-text-tertiary'>{t('workflow.panel.optional')}</span>}
|
{!required && <span className='system-xs-regular text-text-tertiary'>{t('workflow.panel.optional')}</span>}
|
||||||
@ -154,7 +154,7 @@ const PromptValuePanel: FC<IPromptValuePanelProps> = ({
|
|||||||
maxLength={max_length || DEFAULT_VALUE_MAX_LEN}
|
maxLength={max_length || DEFAULT_VALUE_MAX_LEN}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{type === 'boolean' && (
|
{type === 'checkbox' && (
|
||||||
<BoolInput
|
<BoolInput
|
||||||
name={name || key}
|
name={name || key}
|
||||||
value={!!inputs[key]}
|
value={!!inputs[key]}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user