From 8d4ced227ee4a215587c403d1179f07e3707f5df Mon Sep 17 00:00:00 2001 From: twwu Date: Fri, 16 May 2025 17:54:41 +0800 Subject: [PATCH] fix: update click handler logic in OptionCard --- web/app/components/base/param-item/index.tsx | 16 ++++++++-------- .../common/retrieval-param-config/index.tsx | 2 +- .../components/datasets/settings/option-card.tsx | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/web/app/components/base/param-item/index.tsx b/web/app/components/base/param-item/index.tsx index 03eb5a7c42..ab6d4bf20f 100644 --- a/web/app/components/base/param-item/index.tsx +++ b/web/app/components/base/param-item/index.tsx @@ -24,8 +24,8 @@ type Props = { const ParamItem: FC = ({ className, id, name, noTooltip, tip, step = 0.1, min = 0, max, value, enable, onChange, hasSwitch, onSwitchChange }) => { return (
-
-
+
+
{hasSwitch && ( = ({ className, id, name, noTooltip, tip, step = 0.1, }} /> )} - {name} + {name} {!noTooltip && ( {tip}
} + popupContent={
{tip}
} /> )}
-
-
+
+
= ({ className, id, name, noTooltip, tip, step = 0.1, className='w-[72px]' />
-
+
= ({ option.value === RerankingModeEnum.WeightedScore ? ProgressIndicator : Reranking - } alt=''/>} + } alt='' />} title={option.label} description={option.tips} className='flex-1' diff --git a/web/app/components/datasets/settings/option-card.tsx b/web/app/components/datasets/settings/option-card.tsx index 15e69db2bc..d25ba90061 100644 --- a/web/app/components/datasets/settings/option-card.tsx +++ b/web/app/components/datasets/settings/option-card.tsx @@ -57,7 +57,7 @@ const OptionCard = ({ disabled && 'cursor-not-allowed opacity-50', )} onClick={() => { - if (disabled) return + if (isActive || disabled) return onClick?.(id) }} > @@ -70,7 +70,7 @@ const OptionCard = ({
+ )} /> ) } {