fix: support six-decimal steps in model pricing editor (#5332)

Merge pull request #5332 from yyhhyyyyyy/fix/model-pricing-six-decimal-step
This commit is contained in:
同語
2026-06-06 23:22:37 +08:00
committed by GitHub
@@ -523,7 +523,7 @@ function PriceField({ label, hint, value, onChange }: PriceFieldProps) {
<Label className='text-muted-foreground text-xs'>{label}</Label> <Label className='text-muted-foreground text-xs'>{label}</Label>
<DraftNumberInput <DraftNumberInput
min={0} min={0}
step={0.01} step={0.000001}
value={Number.isFinite(value) ? value : 0} value={Number.isFinite(value) ? value : 0}
onValueChange={onChange} onValueChange={onChange}
className='h-8 w-full' className='h-8 w-full'
@@ -1277,7 +1277,7 @@ function RuleGroupCard({
<Label className='text-xs'>{t('Multiplier')}</Label> <Label className='text-xs'>{t('Multiplier')}</Label>
<DraftNumberInput <DraftNumberInput
min={0} min={0}
step={0.01} step={0.000001}
value={group.multiplier} value={group.multiplier}
onValueChange={(value) => onValueChange={(value) =>
onChange({ ...group, multiplier: String(value) }) onChange({ ...group, multiplier: String(value) })