diff --git a/web/app/components/base/input/index.tsx b/web/app/components/base/input/index.tsx index 0fb34de2e8..415ffaf5df 100644 --- a/web/app/components/base/input/index.tsx +++ b/web/app/components/base/input/index.tsx @@ -2,7 +2,7 @@ import type { SVGProps } from 'react' import React, { useState } from 'react' import { useTranslation } from 'react-i18next' -import s from './style.module.css' +import cn from '@/utils/classnames' type InputProps = { placeholder?: string @@ -27,10 +27,10 @@ const Input = ({ value, defaultValue, onChange, className = '', wrapperClassName const { t } = useTranslation() return (
- {showPrefix && {prefixIcon ?? }} + {showPrefix && {prefixIcon ?? }} { diff --git a/web/app/components/base/input/style.module.css b/web/app/components/base/input/style.module.css deleted file mode 100644 index 5f2782777d..0000000000 --- a/web/app/components/base/input/style.module.css +++ /dev/null @@ -1,7 +0,0 @@ -.input { - @apply inline-flex h-7 w-full py-1 px-2 rounded-lg text-xs leading-normal; - @apply bg-gray-100 caret-primary-600 hover:bg-gray-100 focus:ring-1 focus:ring-inset focus:ring-gray-200 focus-visible:outline-none focus:bg-white placeholder:text-gray-400; -} -.prefix { - @apply whitespace-nowrap absolute left-2 self-center -} diff --git a/web/app/components/base/select/index.tsx b/web/app/components/base/select/index.tsx index 660899412b..fbfe742061 100644 --- a/web/app/components/base/select/index.tsx +++ b/web/app/components/base/select/index.tsx @@ -199,7 +199,7 @@ const SimpleSelect: FC = ({ } }} > -
+
{selectedItem?.name ?? localPlaceholder} diff --git a/web/app/components/workflow/nodes/_base/components/field.tsx b/web/app/components/workflow/nodes/_base/components/field.tsx index 344fc3d708..9758575ff9 100644 --- a/web/app/components/workflow/nodes/_base/components/field.tsx +++ b/web/app/components/workflow/nodes/_base/components/field.tsx @@ -13,6 +13,7 @@ import TooltipPlus from '@/app/components/base/tooltip-plus' type Props = { className?: string title: JSX.Element | string | DefaultTFuncReturn + isSubTitle?: boolean tooltip?: string supportFold?: boolean children?: JSX.Element | string | null @@ -23,6 +24,7 @@ type Props = { const Filed: FC = ({ className, title, + isSubTitle, tooltip, children, operations, @@ -38,7 +40,7 @@ const Filed: FC = ({ onClick={() => supportFold && toggleFold()} className={cn('flex justify-between items-center', supportFold && 'cursor-pointer')}>
-
{title}
+
{title}
{tooltip && ( diff --git a/web/app/components/workflow/nodes/_base/components/split.tsx b/web/app/components/workflow/nodes/_base/components/split.tsx index 7b6ca1f38d..28cd05f6da 100644 --- a/web/app/components/workflow/nodes/_base/components/split.tsx +++ b/web/app/components/workflow/nodes/_base/components/split.tsx @@ -11,7 +11,7 @@ const Split: FC = ({ className, }) => { return ( -
+
) } diff --git a/web/app/components/workflow/nodes/list-filter/components/filter-condition.tsx b/web/app/components/workflow/nodes/list-filter/components/filter-condition.tsx index 5fa89c566b..876a100f9f 100644 --- a/web/app/components/workflow/nodes/list-filter/components/filter-condition.tsx +++ b/web/app/components/workflow/nodes/list-filter/components/filter-condition.tsx @@ -1,10 +1,24 @@ 'use client' import type { FC } from 'react' import React from 'react' +import SubVariablePicker from './sub-variable-picker' +import { SimpleSelect as Select } from '@/app/components/base/select' +import Input from '@/app/components/base/input' const FilterCondition: FC = () => { return (
+ +
+ +
) } diff --git a/web/app/components/workflow/nodes/list-filter/components/sub-variable-picker.tsx b/web/app/components/workflow/nodes/list-filter/components/sub-variable-picker.tsx index bb973bf799..3ce4bb6996 100644 --- a/web/app/components/workflow/nodes/list-filter/components/sub-variable-picker.tsx +++ b/web/app/components/workflow/nodes/list-filter/components/sub-variable-picker.tsx @@ -24,7 +24,6 @@ const SubVariablePicker: FC = () => { { value: '2', name: 'age', type: 'number' }, ]} defaultValue={'1'} - allowSearch onSelect={() => { }} placeholder='Select sub variable key' optionClassName='pl-4 pr-5 py-0' diff --git a/web/app/components/workflow/nodes/list-filter/panel.tsx b/web/app/components/workflow/nodes/list-filter/panel.tsx index 0053353281..71e8784450 100644 --- a/web/app/components/workflow/nodes/list-filter/panel.tsx +++ b/web/app/components/workflow/nodes/list-filter/panel.tsx @@ -4,10 +4,12 @@ import { useTranslation } from 'react-i18next' import VarReferencePicker from '../_base/components/variable/var-reference-picker' import OutputVars, { VarItem } from '../_base/components/output-vars' import OptionCard from '../_base/components/option-card' +import Split from '../_base/components/split' import useConfig from './use-config' import SubVariablePicker from './components/sub-variable-picker' import { type ListFilterNodeType, OrderBy } from './types' import LimitConfig from './components/limit-config' +import FilterCondition from './components/filter-condition' import Field from '@/app/components/workflow/nodes/_base/components/field' import { type NodePanelProps } from '@/app/components/workflow/types' import Switch from '@/app/components/base/switch' @@ -46,6 +48,13 @@ const Panel: FC> = ({ /> + + + +