This commit is contained in:
liaoxuezhi 2019-08-22 19:54:43 +08:00
commit b0b4825acb
2 changed files with 4 additions and 6 deletions

View File

@ -563,16 +563,15 @@ export default class Form extends React.Component<FormProps, object> {
return values;
}
resetAfterSubmit && store.reset(onReset);
clearPersistDataAfterSubmit && store.clearPersistData();
if (action.redirect || redirect) {
env.updateLocation(filter(action.redirect || redirect, store.data));
} else if (action.reload || reload) {
this.reloadTarget(action.reload || reload, store.data);
}
resetAfterSubmit && store.reset(onReset);
clearPersistDataAfterSubmit && store.clearPersistData();
return values;
})
.catch(reason => {

View File

@ -402,7 +402,6 @@ export const FormStore = ServiceStore
function getPersistData() {
self.persistData = true;
let data = localStorage.getItem(location.pathname + self.path);
if (data) {
self.updateData(JSON.parse(data));
}