From 20837ac189ff7af857cca6742ba3d88669a535be Mon Sep 17 00:00:00 2001 From: zhangzhulei Date: Thu, 13 Apr 2023 10:18:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=94=B9normalizeSteps?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E7=9A=84=E6=89=A7=E8=A1=8C=E6=97=B6=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis/src/renderers/Wizard.tsx | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/amis/src/renderers/Wizard.tsx b/packages/amis/src/renderers/Wizard.tsx index 9872c03b7..201af62c3 100644 --- a/packages/amis/src/renderers/Wizard.tsx +++ b/packages/amis/src/renderers/Wizard.tsx @@ -408,17 +408,16 @@ export default class Wizard extends React.Component { !hiddenFlag && rawSteps.push(steps[i]); } this.setState({ - rawSteps: rawSteps.map((step, index) => { - delete step.hiddenOn; - return Object.assign(step, { - title: - step.title || - step.label || - __('Steps.step', { - index: index + 1 - }) - }); - }) + rawSteps: rawSteps.map((step, index) => ({ + ...steps, + hiddenOn: '', + title: + step.title || + step.label || + __('Steps.step', { + index: index + 1 + }) + })) }); }