diff --git a/src/BootstrapBlazor/Components/Step/Step.razor.cs b/src/BootstrapBlazor/Components/Step/Step.razor.cs
index 9c7c4c34d91..3b8ffa00455 100644
--- a/src/BootstrapBlazor/Components/Step/Step.razor.cs
+++ b/src/BootstrapBlazor/Components/Step/Step.razor.cs
@@ -116,18 +116,19 @@ protected override void OnParametersSet()
}
///
- /// 上一步
+ /// 移动到上一步方法 返回当前 StepIndex 值
///
- public void Prev()
+ public int Prev()
{
_currentStepIndex = Math.Max(0, _currentStepIndex - 1);
StateHasChanged();
+ return _currentStepIndex;
}
///
- /// 下一步
+ /// 移动到下一步方法 返回当前 StepIndex 值
///
- public async Task Next()
+ public async Task Next()
{
_currentStepIndex = Math.Min(Items.Count, _currentStepIndex + 1);
if (IsFinished && OnFinishedCallback != null)
@@ -135,10 +136,11 @@ public async Task Next()
await OnFinishedCallback();
}
StateHasChanged();
+ return _currentStepIndex;
}
///
- /// 下一步
+ /// 重置步骤方法
///
public void Reset()
{