mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix: setProps and setStepParams should use merge strategy
This commit is contained in:
parent
2a22cf4afc
commit
4ec878af8c
@ -329,7 +329,7 @@ export class FlowModel<Structure extends { parent?: any; subModels?: any } = Def
|
|||||||
if (typeof props === 'string') {
|
if (typeof props === 'string') {
|
||||||
this.props[props] = value;
|
this.props[props] = value;
|
||||||
} else {
|
} else {
|
||||||
this.props = { ...props };
|
this.props = { ...this.props, ...props };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,7 +351,10 @@ export class FlowModel<Structure extends { parent?: any; subModels?: any } = Def
|
|||||||
if (!this.stepParams[flowKey]) {
|
if (!this.stepParams[flowKey]) {
|
||||||
this.stepParams[flowKey] = {};
|
this.stepParams[flowKey] = {};
|
||||||
}
|
}
|
||||||
this.stepParams[flowKey][stepKeyOrStepsParams] = params;
|
this.stepParams[flowKey][stepKeyOrStepsParams] = {
|
||||||
|
...this.stepParams[flowKey][stepKeyOrStepsParams],
|
||||||
|
...params,
|
||||||
|
};
|
||||||
} else if (typeof stepKeyOrStepsParams === 'object' && stepKeyOrStepsParams !== null) {
|
} else if (typeof stepKeyOrStepsParams === 'object' && stepKeyOrStepsParams !== null) {
|
||||||
this.stepParams[flowKey] = { ...(this.stepParams[flowKey] || {}), ...stepKeyOrStepsParams };
|
this.stepParams[flowKey] = { ...(this.stepParams[flowKey] || {}), ...stepKeyOrStepsParams };
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user