From 40cd82a332c9315bf0cb37042efc7b1962648754 Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Wed, 11 Sep 2019 20:17:20 +0800 Subject: [PATCH] =?UTF-8?q?Wizard=20=E5=9C=A8=20modal=20=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderers/Wizard.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/renderers/Wizard.tsx b/src/renderers/Wizard.tsx index 1616892c0..dd9fc62ba 100644 --- a/src/renderers/Wizard.tsx +++ b/src/renderers/Wizard.tsx @@ -363,14 +363,15 @@ export default class Wizard extends React.Component { ...value }); store.markSaving(false); - if (onFinished && onFinished(value, action) === false) { + + if (value && typeof value.step === 'number') { + this.gotoStep(value.step); + } else if (onFinished && onFinished(value, action) === false) { // 如果是 false 后面的操作就不执行 return value; } - if (value && typeof value.step === 'number') { - this.gotoStep(value.step); - } else if (redirect) { + if (redirect) { env.updateLocation(filter(redirect, store.data)); } else if (reload) { this.reloadTarget(reload, store.data); @@ -382,6 +383,8 @@ export default class Wizard extends React.Component { store.markSaving(false); console.error(e); }); + } else { + onFinished && onFinished(store.data, action); } }