60 lines
1.9 KiB
Plaintext
60 lines
1.9 KiB
Plaintext
![]() |
@namespace antblazorpro.Pages.Account.Center
|
||
|
|
||
|
<AntList TItem="ListItemDataType"
|
||
|
Class="filterCardList"
|
||
|
Grid="_listGridType"
|
||
|
DataSource="List">
|
||
|
<ListItem NoFlex>
|
||
|
<Card Bordered
|
||
|
Hoverable
|
||
|
BodyStyle="padding-bottom: 20px;"
|
||
|
Actions="Actions">
|
||
|
<CardMeta>
|
||
|
<AvatarTemplate>
|
||
|
<Avatar Size="small" Src="@context.Avatar" />
|
||
|
</AvatarTemplate>
|
||
|
<TitleTemplate>@context.Title</TitleTemplate>
|
||
|
</CardMeta>
|
||
|
<div class="cardItemContent">
|
||
|
<div class="cardInfo">
|
||
|
<div>
|
||
|
<p>Active User</p>
|
||
|
<p>@FormatWan(context.ActiveUser)</p>
|
||
|
</div>
|
||
|
<div>
|
||
|
<p>New Users</p>
|
||
|
<p>@context.NewUser.ToString("0,0")</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</Card>
|
||
|
</ListItem>
|
||
|
</AntList>
|
||
|
|
||
|
@code
|
||
|
{
|
||
|
|
||
|
private static readonly RenderFragment Download =@<AntDesign.Tooltip Title="@("下载")">
|
||
|
<Icon Type="download" Theme="outline" />
|
||
|
</AntDesign.Tooltip>;
|
||
|
|
||
|
private static readonly IList<RenderFragment> Actions = new List<RenderFragment>
|
||
|
{
|
||
|
Download,
|
||
|
@<AntDesign.Tooltip Title="@("Edit")"><Icon Type="edit" Theme="outline" /></AntDesign.Tooltip>,
|
||
|
@<AntDesign.Tooltip Title="@("Share")"><Icon Type="share-alt" Theme="outline" /></AntDesign.Tooltip>,
|
||
|
@<Dropdown><Icon Type="ellipsis" Theme="outline" /></Dropdown>
|
||
|
};
|
||
|
|
||
|
private static RenderFragment FormatWan(int val) {
|
||
|
if (val > 10000) {
|
||
|
val = (int) Math.Floor((double) val / 10000);
|
||
|
}
|
||
|
|
||
|
return @<span>
|
||
|
@val
|
||
|
<span style="position: relative; top: -2px; font-size: 14px; font-style: normal; margin-left: 2px;">万</span>
|
||
|
</span>;
|
||
|
}
|
||
|
}
|