fix: image random seed uncheck not work

This commit is contained in:
jialin
2024-12-05 13:44:16 +08:00
parent d044423330
commit c8d585889b
4 changed files with 18 additions and 9 deletions
@@ -335,8 +335,14 @@ const GroundImages: React.FC<MessageProps> = forwardRef((props, ref) => {
}, [ImageconstExtraConfig, isOpenaiCompatible, intl]);
const handleFieldChange = (e: any) => {
if (e.target.id.indexOf('random_seed')) {
if (e.target.id.indexOf('random_seed') > -1) {
form.current?.form?.setFieldValue('random_seed', e.target.checked);
setParams((pre: object) => {
return {
...pre,
random_seed: e.target.checked
};
});
}
};
const renderAdvanced = useMemo(() => {