Wizard 的 step 上配置 rediret 和 reload 使其生效

This commit is contained in:
2betop 2020-06-23 19:32:47 +08:00
parent 96ea06d828
commit fbebcb31e4

View File

@ -553,13 +553,16 @@ export default class Wizard extends React.Component<WizardProps, WizardState> {
}
const finalRedirect =
(action.redirect || redirect) &&
filter(action.redirect || redirect, store.data);
(action.redirect || step.redirect || redirect) &&
filter(action.redirect || step.redirect || redirect, store.data);
if (finalRedirect) {
env.jumpTo(finalRedirect, action);
} else if (action.reload || reload) {
this.reloadTarget(action.reload || reload, store.data);
} else if (action.reload || step.reload || reload) {
this.reloadTarget(
action.reload || step.reload || reload,
store.data
);
}
return value;