Fix PageModel.cs

pull/3954/head
liangshiwei 5 years ago
parent 21a395dc25
commit e5f68db556

@ -54,8 +54,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination
CurrentPage = currentPage;
}
ShowingFrom = totalCount == 0 ? 0 : CurrentPage * PageSize;
ShowingTo = totalCount == 0 ? 0 : ShowingFrom + PageSize;
ShowingFrom = totalCount == 0 ? 0 : (CurrentPage - 1) * PageSize + 1;
ShowingTo = totalCount == 0 ? 0 : (int)Math.Min(ShowingFrom + PageSize - 1 , totalCount);
PreviousPage = CurrentPage <= 1 ? 1 : CurrentPage - 1;
NextPage = CurrentPage >= TotalPageCount ? CurrentPage : CurrentPage + 1;
Pages = CalculatePageNumbers();

Loading…
Cancel
Save