mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
fix(LMStudioSettings): prevent negative values in keepAliveMinutes input (#7868)
fix(LMStudioSettings): 修复keepAliveMinutes输入为负数的问题 确保输入值通过Math.floor处理且最小值为0,避免负数输入
This commit is contained in:
parent
a4620f8c68
commit
4c81efc5b3
@ -17,7 +17,8 @@ const LMStudioSettings: FC = () => {
|
||||
<InputNumber
|
||||
style={{ width: '100%' }}
|
||||
value={keepAliveMinutes}
|
||||
onChange={(e) => setKeepAliveMinutes(Number(e))}
|
||||
min={0}
|
||||
onChange={(e) => setKeepAliveMinutes(Math.floor(Number(e)))}
|
||||
onBlur={() => setKeepAliveTime(keepAliveMinutes)}
|
||||
suffix={t('lmstudio.keep_alive_time.placeholder')}
|
||||
step={5}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user