Feat: Add DualRangeSlider #3221 (#5386)

### What problem does this PR solve?

Feat: Add DualRangeSlider #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-02-26 17:02:42 +08:00
committed by GitHub
parent cdcaae17c6
commit 63e3398f49
6 changed files with 127 additions and 21 deletions

View File

@ -3,6 +3,7 @@ import { useTranslate } from '@/hooks/common-hooks';
import { useSelectLlmOptionsByModelType } from '@/hooks/llm-hooks';
import { Select as AntSelect, Form, Slider } from 'antd';
import { useFormContext } from 'react-hook-form';
import { SingleFormSlider } from './ui/dual-range-slider';
import {
FormControl,
FormField,
@ -19,7 +20,6 @@ import {
SelectTrigger,
SelectValue,
} from './ui/select';
import { FormSlider } from './ui/slider';
type FieldType = {
rerank_id?: string;
@ -140,7 +140,11 @@ export function RerankFormFields() {
<FormItem>
<FormLabel>{t('topK')}</FormLabel>
<FormControl>
<FormSlider {...field} max={2048} min={1}></FormSlider>
<SingleFormSlider
{...field}
max={2048}
min={1}
></SingleFormSlider>
</FormControl>
<FormMessage />
</FormItem>