mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 04:48:32 +08:00
fix: 更改normalizeSteps方法的执行时机
This commit is contained in:
parent
41f18dc4ee
commit
f5373bfdd6
@ -349,8 +349,11 @@ export default class Wizard extends React.Component<WizardProps, WizardState> {
|
|||||||
const props = this.props;
|
const props = this.props;
|
||||||
const {store, fetchSuccess, fetchFailed} = props;
|
const {store, fetchSuccess, fetchFailed} = props;
|
||||||
|
|
||||||
// 步骤steps改变
|
// 步骤steps、上下文数据data改变时需要执行normalizeSteps
|
||||||
if (!isEqual(prevProps.steps, props.steps)) {
|
if (
|
||||||
|
!isEqual(prevProps.steps, props.steps) ||
|
||||||
|
!isEqual(prevProps.data, props.data)
|
||||||
|
) {
|
||||||
this.normalizeSteps(props.data);
|
this.normalizeSteps(props.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1339,7 +1342,6 @@ export class WizardRenderer extends Wizard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setData(values: object, replace?: boolean) {
|
setData(values: object, replace?: boolean) {
|
||||||
this.normalizeSteps(values);
|
|
||||||
return this.props.store.updateData(values, undefined, replace);
|
return this.props.store.updateData(values, undefined, replace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user