src/mvc/admin/Bootstrap.Admin/Pages/Components/PaginationBase.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
// Website: https://admin.blazor.zone
using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
namespace Bootstrap.Admin.Pages.Components
{
/// <summary>
/// 分页组件基类
/// </summary>
public class PaginationBase : ComponentBase
{
/// <summary>
///
/// </summary>
[Parameter]
public int TotalCount { get; set; }
/// <summary>
///
/// </summary>
[Parameter]
public int PageIndex { get; set; } = 1;
/// <summary>
///
/// </summary>
[Parameter]
public int PageItems { get; set; }
/// <summary>
/// 获得/设置 页码总数
/// </summary>
public int PageCount
{
get
{
return (int)Math.Ceiling(TotalCount * 1.0 / PageItems); ;
}
}
/// <summary>
///
/// </summary>
[Parameter]
public Action<int, int> OnPageClick { get; set; } = new Action<int, int>((pageIndex, pageItems) => { });
/// <summary>
///
/// </summary>
[Parameter]
public Action<int> OnPageItemsChange { get; set; } = new Action<int>((pageItems) => { });
/// <summary>
///
/// </summary>
protected void MovePrev()
后面还有 61 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
