From bfaef2cca61f8e431a6e33bf85f977df656d0eaa Mon Sep 17 00:00:00 2001 From: balibabu Date: Fri, 11 Oct 2024 11:06:14 +0800 Subject: [PATCH] feat: Arrange the form of generate, categorize, switch, retrieval operators vertically #1739 (#2800) ### What problem does this PR solve? feat: Arrange the form of generate, categorize, switch, retrieval operators vertically #1739 ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe): --- web/src/pages/flow/flow-drawer/index.less | 6 ++++++ web/src/pages/flow/flow-drawer/index.tsx | 16 +++++++++------- .../pages/flow/form/categorize-form/index.tsx | 3 +-- web/src/pages/flow/form/generate-form/index.tsx | 3 +-- .../pages/flow/form/retrieval-form/index.tsx | 3 +-- web/src/pages/flow/form/switch-form/index.tsx | 17 +---------------- 6 files changed, 19 insertions(+), 29 deletions(-) diff --git a/web/src/pages/flow/flow-drawer/index.less b/web/src/pages/flow/flow-drawer/index.less index c6740fa7c..b3a5fcb43 100644 --- a/web/src/pages/flow/flow-drawer/index.less +++ b/web/src/pages/flow/flow-drawer/index.less @@ -1,3 +1,9 @@ .title { flex-basis: 60px; } + +.formWrapper { + :global(.ant-form-item-label) { + font-weight: 600; + } +} diff --git a/web/src/pages/flow/flow-drawer/index.tsx b/web/src/pages/flow/flow-drawer/index.tsx index c481405e9..639675ec3 100644 --- a/web/src/pages/flow/flow-drawer/index.tsx +++ b/web/src/pages/flow/flow-drawer/index.tsx @@ -118,13 +118,15 @@ const FlowDrawer = ({ mask={false} width={470} > - {visible && ( - - )} +
+ {visible && ( + + )} +
); }; diff --git a/web/src/pages/flow/form/categorize-form/index.tsx b/web/src/pages/flow/form/categorize-form/index.tsx index a1ac944dc..9e8129f8e 100644 --- a/web/src/pages/flow/form/categorize-form/index.tsx +++ b/web/src/pages/flow/form/categorize-form/index.tsx @@ -18,12 +18,11 @@ const CategorizeForm = ({ form, onValuesChange, node }: IOperatorForm) => { return (
{ return ( { return ( { const { t } = useTranslation(); const buildCategorizeToOptions = useBuildFormSelectOptions( @@ -53,13 +45,12 @@ const SwitchForm = ({ onValuesChange, node, form }: IOperatorForm) => { return ( {(fields, { add, remove }) => ( @@ -125,8 +116,6 @@ const SwitchForm = ({ onValuesChange, node, form }: IOperatorForm) => { {