mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-04 13:08:23 +08:00
f9b615c2ca
...for affix,back-top,breadcrumb,card,divider,typogragpy and timeline Co-authored-by: ElderJames <shunjiey@hotmail.com>
59 lines
1.8 KiB
C#
59 lines
1.8 KiB
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
|
|
<li class="@ClassMapper.Class" style="@Style" @ref="Ref" title="@_title" id="@Id" @onclick="ClickItem" @key="Key">
|
|
@if (_itemRender != null)
|
|
{
|
|
@_itemRender(ItemRenderContext)
|
|
}
|
|
else
|
|
{
|
|
@_renderItemTemplate(ItemRenderContext)
|
|
}
|
|
</li>
|
|
|
|
@code {
|
|
|
|
private readonly RenderFragment<PaginationItemRenderContext> _renderItemTemplate = (context) =>
|
|
@<Template>
|
|
@{
|
|
var type = context.Type;
|
|
var page = context.Page;
|
|
}
|
|
|
|
@if (type == "page")
|
|
{
|
|
<a>@(page)</a>
|
|
|
|
}
|
|
else
|
|
{
|
|
<a class="ant-pagination-item-link">
|
|
@switch (type)
|
|
{
|
|
case "prev":
|
|
<Icon Type="left"></Icon>
|
|
break;
|
|
case "next":
|
|
<Icon Type="right"></Icon>
|
|
break;
|
|
default:
|
|
<div class="ant-pagination-item-container">
|
|
@if (type == "prev_5")
|
|
{
|
|
<Icon Type="double-left" Class="ant-pagination-item-link-icon"></Icon>
|
|
}
|
|
else if (type == "next_5")
|
|
{
|
|
<Icon Type="double-right" Class="ant-pagination-item-link-icon"></Icon>
|
|
}
|
|
<span class="ant-pagination-item-ellipsis">•••</span>
|
|
</div>
|
|
break;
|
|
}
|
|
</a>
|
|
}
|
|
</Template>;
|
|
|
|
}
|