From fef75686f6db7feba13a30cbb088ed37b0a3f35e Mon Sep 17 00:00:00 2001 From: "Zhenyun.Wu" Date: Tue, 10 Sep 2019 11:22:48 +0800 Subject: [PATCH] fix(module: steps): fix step status icon (#577) --- components/steps/steps.component.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/components/steps/steps.component.ts b/components/steps/steps.component.ts index 659064af..5c2c3da9 100644 --- a/components/steps/steps.component.ts +++ b/components/steps/steps.component.ts @@ -63,7 +63,7 @@ export class StepsComponent implements OnInit, AfterContentInit { @HostBinding('class.am-steps-horizontal') clsStepsHztl: boolean; - constructor(private _elf: ElementRef, private _render: Renderer2) {} + constructor(private _elf: ElementRef, private _render: Renderer2) { } setStepStyle() { const itemCount = this.stepItems.length; @@ -85,8 +85,17 @@ export class StepsComponent implements OnInit, AfterContentInit { } else { step.status = StepStatusEnum.WAIT; } + } else if (step.status && !icon) { + switch (step.status) { + case StepStatusEnum.FINISH: + icon = 'check-circle-o'; + break; + case StepStatusEnum.ERROR: + icon = 'cross-circle-o'; + break; + } } - if (!icon) { + if (!icon && step.status !== StepStatusEnum.PROCESS) { if (index < this._current) { icon = 'check-circle-o'; } else if (index > this._current) {