Skip to content

Commit f7fe3ff

Browse files
committed
feat: 向后一步方法返回当前步骤索引值
1 parent 74891b5 commit f7fe3ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/BootstrapBlazor/Components/Step/Step.razor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,15 @@ public int Prev()
128128
/// <summary>
129129
/// 移动到下一步方法 返回当前 StepIndex 值
130130
/// </summary>
131-
public async Task Next()
131+
public async Task<int> Next()
132132
{
133133
_currentStepIndex = Math.Min(Items.Count, _currentStepIndex + 1);
134134
if (IsFinished && OnFinishedCallback != null)
135135
{
136136
await OnFinishedCallback();
137137
}
138138
StateHasChanged();
139+
return _currentStepIndex;
139140
}
140141

141142
/// <summary>

0 commit comments

Comments
 (0)