using Hncore.Infrastructure.WebApi; using Hncore.Pass.Vpn.Domain; using Microsoft.AspNetCore.Mvc; using System; using System.Threading.Tasks; namespace ViewComponents { public class PagerModel { public int Total { get; set; } public int PageSize { get; set; } = 50; public int PageIndex { get; set; } = 1; public string Param { get; set; } public int TotalPage { get => (int)Math.Ceiling(this.Total / (this.PageSize * 1.0d)); } } public class PagerViewComponent: ViewComponent { public async Task InvokeAsync(PagerModel model) { return View(model); } } }