File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/BootstrapBlazor/Components/Step Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -116,29 +116,31 @@ protected override void OnParametersSet()
116116 }
117117
118118 /// <summary>
119- /// 上一步
119+ /// 移动到上一步方法 返回当前 StepIndex 值
120120 /// </summary>
121- public void Prev ( )
121+ public int Prev ( )
122122 {
123123 _currentStepIndex = Math . Max ( 0 , _currentStepIndex - 1 ) ;
124124 StateHasChanged ( ) ;
125+ return _currentStepIndex ;
125126 }
126127
127128 /// <summary>
128- /// 下一步
129+ /// 移动到下一步方法 返回当前 StepIndex 值
129130 /// </summary>
130- public async Task Next ( )
131+ public async Task < int > Next ( )
131132 {
132133 _currentStepIndex = Math . Min ( Items . Count , _currentStepIndex + 1 ) ;
133134 if ( IsFinished && OnFinishedCallback != null )
134135 {
135136 await OnFinishedCallback ( ) ;
136137 }
137138 StateHasChanged ( ) ;
139+ return _currentStepIndex ;
138140 }
139141
140142 /// <summary>
141- /// 下一步
143+ /// 重置步骤方法
142144 /// </summary>
143145 public void Reset ( )
144146 {
You can’t perform that action at this time.
0 commit comments