feat: 登录日志增加默认 LoginTime 倒序排序功能

This commit is contained in:
Argo-Tianyi 2022-01-21 12:30:16 +08:00
parent d7b7bef4c2
commit 0d609c41b0
2 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
@page "/admin/logins"
<AdminTable TItem="LoginLog" IsPagination="true" CustomerSearchModel="@TableSearchModel"
ShowDefaultButtons="false" ShowExtendButtons="false" IsFixedHeader="false">
<AdminTable TItem="LoginLog" IsPagination="true" CustomerSearchModel="@TableSearchModel" SortList="SortList"
ShowDefaultButtons="false" ShowExtendButtons="false">
<TableColumns>
<TableColumn @bind-Field="@context.UserName" Filterable="true" Searchable="true"></TableColumn>
<TableColumn @bind-Field="@context.LoginTime" Filterable="true"></TableColumn>

View File

@ -11,4 +11,6 @@ public partial class Logins
///
/// </summary>
public ITableSearchModel TableSearchModel { get; set; } = new LoginLogModel();
private List<string> SortList { get; set; } = new List<string>() { "LoginTime desc" };
}