Skip to content

Commit 9e62045

Browse files
committed
fix steps current
1 parent b7f493a commit 9e62045

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-steps",
3-
"version": "3.2.0",
3+
"version": "3.2.1",
44
"description": "steps ui component for react",
55
"keywords": [
66
"react",

src/Steps.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ export default class Steps extends Component {
107107
if (!child) {
108108
return null;
109109
}
110-
const stepNumber = initial ? initial + index : index + 1;
110+
const stepNumber = initial + index;
111111
const childProps = {
112-
stepNumber: `${stepNumber}`,
112+
stepNumber: `${stepNumber + 1}`,
113113
prefixCls,
114114
iconPrefix,
115115
wrapperStyle: style,

tests/__snapshots__/index.test.js.snap

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`Steps render renders correctly 1`] = `
55
class="rc-steps rc-steps-horizontal rc-steps-label-horizontal"
66
>
77
<div
8-
class="rc-steps-item rc-steps-item-wait"
8+
class="rc-steps-item rc-steps-item-process"
99
>
1010
<div
1111
class="rc-steps-item-tail"
@@ -147,7 +147,7 @@ exports[`Steps render renders current correctly 1`] = `
147147
</div>
148148
</div>
149149
<div
150-
class="rc-steps-item rc-steps-item-process"
150+
class="rc-steps-item rc-steps-item-finish"
151151
>
152152
<div
153153
class="rc-steps-item-tail"
@@ -158,9 +158,9 @@ exports[`Steps render renders current correctly 1`] = `
158158
class="rc-steps-item-icon"
159159
>
160160
<span
161-
class="rc-steps-icon"
161+
class="rc-steps-icon rcicon rcicon-check"
162162
>
163-
2
163+
164164
</span>
165165
</div>
166166
<div
@@ -174,7 +174,7 @@ exports[`Steps render renders current correctly 1`] = `
174174
</div>
175175
</div>
176176
<div
177-
class="rc-steps-item rc-steps-item-wait"
177+
class="rc-steps-item rc-steps-item-process"
178178
>
179179
<div
180180
class="rc-steps-item-tail"
@@ -235,7 +235,7 @@ exports[`Steps render renders labelPlacement correctly 1`] = `
235235
class="rc-steps rc-steps-horizontal rc-steps-label-vertical"
236236
>
237237
<div
238-
class="rc-steps-item rc-steps-item-wait"
238+
class="rc-steps-item rc-steps-item-process"
239239
>
240240
<div
241241
class="rc-steps-item-tail"
@@ -350,7 +350,7 @@ exports[`Steps render renders progressDot correctly 1`] = `
350350
class="rc-steps rc-steps-horizontal rc-steps-label-vertical rc-steps-dot"
351351
>
352352
<div
353-
class="rc-steps-item rc-steps-item-wait"
353+
class="rc-steps-item rc-steps-item-process"
354354
>
355355
<div
356356
class="rc-steps-item-tail"
@@ -481,7 +481,7 @@ exports[`Steps render renders progressDot function correctly 1`] = `
481481
class="rc-steps rc-steps-horizontal rc-steps-label-vertical rc-steps-dot"
482482
>
483483
<div
484-
class="rc-steps-item rc-steps-item-wait"
484+
class="rc-steps-item rc-steps-item-process"
485485
>
486486
<div
487487
class="rc-steps-item-tail"
@@ -631,7 +631,7 @@ exports[`Steps render renders status correctly 1`] = `
631631
</div>
632632
</div>
633633
<div
634-
class="rc-steps-item rc-steps-item-error rc-steps-next-error"
634+
class="rc-steps-item rc-steps-item-finish rc-steps-next-error"
635635
>
636636
<div
637637
class="rc-steps-item-tail"
@@ -642,7 +642,7 @@ exports[`Steps render renders status correctly 1`] = `
642642
class="rc-steps-item-icon"
643643
>
644644
<span
645-
class="rc-steps-icon rcicon rcicon-cross"
645+
class="rc-steps-icon rcicon rcicon-check"
646646
>
647647
648648
</span>
@@ -658,7 +658,7 @@ exports[`Steps render renders status correctly 1`] = `
658658
</div>
659659
</div>
660660
<div
661-
class="rc-steps-item rc-steps-item-wait"
661+
class="rc-steps-item rc-steps-item-error"
662662
>
663663
<div
664664
class="rc-steps-item-tail"
@@ -669,9 +669,9 @@ exports[`Steps render renders status correctly 1`] = `
669669
class="rc-steps-item-icon"
670670
>
671671
<span
672-
class="rc-steps-icon"
672+
class="rc-steps-icon rcicon rcicon-cross"
673673
>
674-
3
674+
675675
</span>
676676
</div>
677677
<div
@@ -719,7 +719,7 @@ exports[`Steps render renders step with description 1`] = `
719719
class="rc-steps rc-steps-horizontal rc-steps-label-horizontal"
720720
>
721721
<div
722-
class="rc-steps-item rc-steps-item-wait"
722+
class="rc-steps-item rc-steps-item-process"
723723
>
724724
<div
725725
class="rc-steps-item-tail"
@@ -989,7 +989,7 @@ exports[`Steps render renders step with tailContent 1`] = `
989989
class="rc-steps rc-steps-horizontal rc-steps-label-horizontal"
990990
>
991991
<div
992-
class="rc-steps-item rc-steps-item-wait"
992+
class="rc-steps-item rc-steps-item-process"
993993
>
994994
<div
995995
class="rc-steps-item-tail"
@@ -1126,7 +1126,7 @@ exports[`Steps render renders vertical correctly 1`] = `
11261126
class="rc-steps rc-steps-vertical"
11271127
>
11281128
<div
1129-
class="rc-steps-item rc-steps-item-wait"
1129+
class="rc-steps-item rc-steps-item-process"
11301130
>
11311131
<div
11321132
class="rc-steps-item-tail"

0 commit comments

Comments
 (0)