mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-07-20 20:44:27 +08:00
fix: in variable settings, use Textarea to replace Input. (#17864)
This commit is contained in:
parent
b2f5ca356a
commit
fe19cc7568
@ -322,9 +322,11 @@ const ChatVariableModal = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className='flex'>
|
<div className='flex'>
|
||||||
{type === ChatVarType.String && (
|
{type === ChatVarType.String && (
|
||||||
<Input
|
// Input will remove \n\r, so use Textarea just like description area
|
||||||
placeholder={t('workflow.chatVariable.modal.valuePlaceholder') || ''}
|
<textarea
|
||||||
|
className='system-sm-regular placeholder:system-sm-regular block h-20 w-full resize-none appearance-none rounded-lg border border-transparent bg-components-input-bg-normal p-2 caret-primary-600 outline-none placeholder:text-components-input-text-placeholder hover:border-components-input-border-hover hover:bg-components-input-bg-hover focus:border-components-input-border-active focus:bg-components-input-bg-active focus:shadow-xs'
|
||||||
value={value}
|
value={value}
|
||||||
|
placeholder={t('workflow.chatVariable.modal.valuePlaceholder') || ''}
|
||||||
onChange={e => setValue(e.target.value)}
|
onChange={e => setValue(e.target.value)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
@ -131,12 +131,20 @@ const VariableModal = ({
|
|||||||
<div className=''>
|
<div className=''>
|
||||||
<div className='system-sm-semibold mb-1 flex h-6 items-center text-text-secondary'>{t('workflow.env.modal.value')}</div>
|
<div className='system-sm-semibold mb-1 flex h-6 items-center text-text-secondary'>{t('workflow.env.modal.value')}</div>
|
||||||
<div className='flex'>
|
<div className='flex'>
|
||||||
<Input
|
{
|
||||||
|
type !== 'number' ? <textarea
|
||||||
|
className='system-sm-regular placeholder:system-sm-regular block h-20 w-full resize-none appearance-none rounded-lg border border-transparent bg-components-input-bg-normal p-2 caret-primary-600 outline-none placeholder:text-components-input-text-placeholder hover:border-components-input-border-hover hover:bg-components-input-bg-hover focus:border-components-input-border-active focus:bg-components-input-bg-active focus:shadow-xs'
|
||||||
|
value={value}
|
||||||
|
placeholder={t('workflow.env.modal.valuePlaceholder') || ''}
|
||||||
|
onChange={e => setValue(e.target.value)}
|
||||||
|
/>
|
||||||
|
: <Input
|
||||||
placeholder={t('workflow.env.modal.valuePlaceholder') || ''}
|
placeholder={t('workflow.env.modal.valuePlaceholder') || ''}
|
||||||
value={value}
|
value={value}
|
||||||
onChange={e => setValue(e.target.value)}
|
onChange={e => setValue(e.target.value)}
|
||||||
type={type !== 'number' ? 'text' : 'number'}
|
type="number"
|
||||||
/>
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user