fix: workflow inputs panel

This commit is contained in:
StyleZhang 2024-09-20 18:00:35 +08:00
parent ab19fccf3d
commit 0cb50dd4a5

View File

@ -56,13 +56,17 @@ const InputsPanel = ({ onRun }: Props) => {
}, [fileSettings?.image?.enabled, startVariables])
const handleValueChange = (variable: string, v: any) => {
const {
inputs,
setInputs,
} = workflowStore.getState()
if (variable === '__image') {
workflowStore.setState({
files: v,
})
}
else {
workflowStore.getState().setInputs({
setInputs({
...inputs,
[variable]: v,
})