mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-13 03:39:02 +08:00
fix: some filed in model param selector has no left spacing (#4803)
This commit is contained in:
parent
5b2cd8d03a
commit
11f173693b
@ -70,7 +70,7 @@ const TagInput: FC<TagInputProps> = ({
|
|||||||
return (
|
return (
|
||||||
<div className={cn('flex flex-wrap', !isInWorkflow && 'min-w-[200px]', isSpecialMode ? 'bg-gray-100 rounded-lg pb-1 pl-1' : '')}>
|
<div className={cn('flex flex-wrap', !isInWorkflow && 'min-w-[200px]', isSpecialMode ? 'bg-gray-100 rounded-lg pb-1 pl-1' : '')}>
|
||||||
{
|
{
|
||||||
items.map((item, index) => (
|
(items || []).map((item, index) => (
|
||||||
<div
|
<div
|
||||||
key={item}
|
key={item}
|
||||||
className={cn('flex items-center mr-1 mt-1 px-2 py-1 text-sm text-gray-700 border border-gray-200', isSpecialMode ? 'bg-white rounded-md' : 'rounded-lg')}>
|
className={cn('flex items-center mr-1 mt-1 px-2 py-1 text-sm text-gray-700 border border-gray-200', isSpecialMode ? 'bg-white rounded-md' : 'rounded-lg')}>
|
||||||
|
@ -181,7 +181,7 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
|||||||
if (parameterRule.type === 'string' && !parameterRule.options?.length) {
|
if (parameterRule.type === 'string' && !parameterRule.options?.length) {
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
className={cn(isInWorkflow ? 'w-[200px]' : 'w-full', 'flex items-center px-3 h-8 appearance-none outline-none rounded-lg bg-gray-100 text-[13px] text-gra-900')}
|
className={cn(isInWorkflow ? 'w-[200px]' : 'w-full', 'ml-4 flex items-center px-3 h-8 appearance-none outline-none rounded-lg bg-gray-100 text-[13px] text-gra-900')}
|
||||||
value={renderValue as string}
|
value={renderValue as string}
|
||||||
onChange={handleStringInputChange}
|
onChange={handleStringInputChange}
|
||||||
/>
|
/>
|
||||||
@ -192,7 +192,7 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
|||||||
return (
|
return (
|
||||||
<SimpleSelect
|
<SimpleSelect
|
||||||
className='!py-0'
|
className='!py-0'
|
||||||
wrapperClassName={cn(isInWorkflow ? '!w-[200px]' : 'w-full', '!h-8')}
|
wrapperClassName={cn(isInWorkflow ? '!w-[200px]' : 'w-full', 'ml-4 !h-8')}
|
||||||
defaultValue={renderValue as string}
|
defaultValue={renderValue as string}
|
||||||
onSelect={handleSelect}
|
onSelect={handleSelect}
|
||||||
items={parameterRule.options.map(option => ({ value: option, name: option }))}
|
items={parameterRule.options.map(option => ({ value: option, name: option }))}
|
||||||
@ -202,7 +202,7 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
|||||||
|
|
||||||
if (parameterRule.type === 'tag') {
|
if (parameterRule.type === 'tag') {
|
||||||
return (
|
return (
|
||||||
<div className={isInWorkflow ? 'w-[200px]' : 'w-full'}>
|
<div className={cn(isInWorkflow ? 'w-[200px]' : 'w-full', 'ml-4')}>
|
||||||
<TagInput
|
<TagInput
|
||||||
items={renderValue as string[]}
|
items={renderValue as string[]}
|
||||||
onChange={handleTagChange}
|
onChange={handleTagChange}
|
||||||
@ -219,7 +219,7 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
|||||||
return (
|
return (
|
||||||
<div className={`flex items-center justify-between ${className}`}>
|
<div className={`flex items-center justify-between ${className}`}>
|
||||||
<div>
|
<div>
|
||||||
<div className={cn(isInWorkflow ? 'w-[140px]' : 'w-full', 'shrink-0 flex items-center')}>
|
<div className={cn(isInWorkflow ? 'w-[140px]' : 'w-full', 'ml-4 shrink-0 flex items-center')}>
|
||||||
<div
|
<div
|
||||||
className='mr-0.5 text-[13px] font-medium text-gray-700 truncate'
|
className='mr-0.5 text-[13px] font-medium text-gray-700 truncate'
|
||||||
title={parameterRule.label[language] || parameterRule.label.en_US}
|
title={parameterRule.label[language] || parameterRule.label.en_US}
|
||||||
@ -250,7 +250,7 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
parameterRule.type === 'tag' && (
|
parameterRule.type === 'tag' && (
|
||||||
<div className={cn(!isInWorkflow && 'w-[200px]', ' text-gray-400 text-xs font-normal')}>
|
<div className={cn(!isInWorkflow && 'w-[200px]', 'text-gray-400 text-xs font-normal')}>
|
||||||
{parameterRule?.tagPlaceholder?.[language]}
|
{parameterRule?.tagPlaceholder?.[language]}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user