From 4e6db1f4fbb2a6faa29a04be887effdc150bdfd3 Mon Sep 17 00:00:00 2001 From: NFish Date: Wed, 18 Dec 2024 11:46:41 +0800 Subject: [PATCH] fix: update parent child style --- web/app/components/base/param-item/index.tsx | 13 ++-- web/app/components/base/radio-card/index.tsx | 21 ++--- .../common/retrieval-method-config/index.tsx | 2 +- .../common/retrieval-param-config/index.tsx | 6 +- .../datasets/create/step-two/index.tsx | 76 ++++++++++--------- .../datasets/create/step-two/option-card.tsx | 8 +- 6 files changed, 69 insertions(+), 57 deletions(-) diff --git a/web/app/components/base/param-item/index.tsx b/web/app/components/base/param-item/index.tsx index 5c63a39d5a..2252e99233 100644 --- a/web/app/components/base/param-item/index.tsx +++ b/web/app/components/base/param-item/index.tsx @@ -24,30 +24,29 @@ type Props = { const ParamItem: FC = ({ className, id, name, noTooltip, tip, step = 0.1, min = 0, max, value, enable, onChange, hasSwitch, onSwitchChange }) => { return (
-
+
{hasSwitch && ( { onSwitchChange?.(id, val) }} /> )} - {name} + {name} {!noTooltip && ( {tip}
} /> )} -
-
-
-
+
+
= ({ className, id, name, noTooltip, tip, step = 0.1, className='w-[72px]' />
-
+
= ({ return (
-
-
+
+
{icon}
-
{title}
-
{description}
+
{title}
+
{description}
{!noRadio && ( -
+
= ({ )}
{((isChosen && chosenConfig) || noRadio) && ( -
- {chosenConfig} +
+
+
+ {chosenConfig} +
)}
diff --git a/web/app/components/datasets/common/retrieval-method-config/index.tsx b/web/app/components/datasets/common/retrieval-method-config/index.tsx index aeeb7235e4..3a60bd8818 100644 --- a/web/app/components/datasets/common/retrieval-method-config/index.tsx +++ b/web/app/components/datasets/common/retrieval-method-config/index.tsx @@ -104,7 +104,7 @@ const RetrievalMethodConfig: FC = ({ title={
{t('dataset.retrieval.hybrid_search.title')}
- +
} description={t('dataset.retrieval.hybrid_search.description')} isActive={ diff --git a/web/app/components/datasets/common/retrieval-param-config/index.tsx b/web/app/components/datasets/common/retrieval-param-config/index.tsx index dc29a3b524..5136ac1659 100644 --- a/web/app/components/datasets/common/retrieval-param-config/index.tsx +++ b/web/app/components/datasets/common/retrieval-param-config/index.tsx @@ -120,7 +120,7 @@ const RetrievalParamConfig: FC = ({
{!isEconomical && !isHybridSearch && (
-
+
{canToggleRerankModalEnable && (
= ({
)}
- {t('common.modelProvider.rerankModel.key')} + {t('common.modelProvider.rerankModel.key')} {t('common.modelProvider.rerankModel.tip')}
@@ -167,7 +167,7 @@ const RetrievalParamConfig: FC = ({ )} { !isHybridSearch && ( -
+
} + icon={{t('datasetCreation.stepTwo.general')}} activeHeaderClassName='bg-dataset-option-card-blue-gradient' description={t('datasetCreation.stepTwo.generalTip')} isActive={ @@ -599,7 +599,7 @@ const StepTwo = ({ actions={ <>