mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-16 05:18:18 +08:00
fix: model parameter load presets config (#2622)
This commit is contained in:
parent
88a095e40e
commit
7beff3fd5a
@ -115,6 +115,11 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if ((parameterRule.type === 'int' || parameterRule.type === 'float') && numberInputRef.current)
|
||||||
|
numberInputRef.current.value = `${renderValue}`
|
||||||
|
}, [value])
|
||||||
|
|
||||||
const renderInput = () => {
|
const renderInput = () => {
|
||||||
const numberInputWithSlide = (parameterRule.type === 'int' || parameterRule.type === 'float')
|
const numberInputWithSlide = (parameterRule.type === 'int' || parameterRule.type === 'float')
|
||||||
&& !isNullOrUndefined(parameterRule.min)
|
&& !isNullOrUndefined(parameterRule.min)
|
||||||
@ -207,11 +212,6 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (numberInputRef.current)
|
|
||||||
numberInputRef.current.value = `${renderValue}`
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`flex items-center justify-between ${className}`}>
|
<div className={`flex items-center justify-between ${className}`}>
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user