mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 09:21:24 +08:00
0420ae26dd
* feat: add progress step * docs: add demos Co-authored-by: James Yeung <shunjiey@hotmail.com>
133 lines
4.6 KiB
C#
133 lines
4.6 KiB
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
<div class="@ClassMapper.Class" style="@Style"id="@Id">
|
|
<div class="ant-steps-item-container" @onclick="@OnClick" tabindex="@GetTabIndex()" @attributes="@_containerAttributes">
|
|
@if (!Last)
|
|
{
|
|
<div class="ant-steps-item-tail"></div>
|
|
}
|
|
<div class="ant-steps-item-icon">
|
|
@if (!ShowProcessDot)
|
|
{
|
|
@if (Percent != null && Parent.Current == Index)
|
|
{
|
|
<div class="ant-steps-progress-icon">
|
|
<Progress
|
|
Percent="@((double) Percent)"
|
|
Width=@(Size == "small" ? 30 : 38)
|
|
Type=ProgressType.Circle
|
|
StrokeWidth="4"
|
|
Format=@((p) => "")/>
|
|
<span class="ant-steps-icon">
|
|
|
|
@if (string.IsNullOrEmpty(Icon))
|
|
{
|
|
if (Status == "finish")
|
|
{
|
|
<Icon type="check"></Icon>
|
|
}
|
|
else if (Status == "error")
|
|
{
|
|
<Icon type="close"></Icon>
|
|
}
|
|
else if (Status == "process" || Status == "wait")
|
|
{
|
|
@(Index + 1)
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (Status == "error")
|
|
{
|
|
<Icon type="close"></Icon>
|
|
}
|
|
else
|
|
{
|
|
<Icon type="@Icon"></Icon>
|
|
}
|
|
}
|
|
</span>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<span class="ant-steps-icon">
|
|
|
|
@if (string.IsNullOrEmpty(Icon))
|
|
{
|
|
if (Status == "finish")
|
|
{
|
|
<Icon type="check"></Icon>
|
|
}
|
|
else if (Status == "error")
|
|
{
|
|
<Icon type="close"></Icon>
|
|
}
|
|
else if (Status == "process" || Status == "wait")
|
|
{
|
|
@(Index + 1)
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (Status == "error")
|
|
{
|
|
<Icon type="close"></Icon>
|
|
}
|
|
else
|
|
{
|
|
<Icon type="@Icon"></Icon>
|
|
}
|
|
}
|
|
</span>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<span class="ant-steps-icon">
|
|
<span class="ant-steps-icon-dot"></span>
|
|
</span>
|
|
}
|
|
</div>
|
|
<div class="ant-steps-item-content">
|
|
<div class="ant-steps-item-title">
|
|
@if (Title.IsT0)
|
|
{
|
|
@Title.AsT0
|
|
}
|
|
else
|
|
{
|
|
@Title.AsT1
|
|
}
|
|
@if (Subtitle.Value != null)
|
|
{
|
|
<div class="ant-steps-item-subtitle">
|
|
@if (Subtitle.IsT0)
|
|
{
|
|
@Subtitle.AsT0
|
|
}
|
|
else
|
|
{
|
|
@Subtitle.AsT1
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
@if (Description.Value != null)
|
|
{
|
|
<div class="ant-steps-item-description">
|
|
@if (Description.IsT0)
|
|
{
|
|
@Description.AsT0
|
|
}
|
|
else
|
|
{
|
|
@Description.AsT1
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div> |