refactor: Table 组件 ShowPagination 默认值改为 true
This commit is contained in:
parent
a34d621f42
commit
35fb697651
|
@ -141,7 +141,7 @@ namespace Bootstrap.Admin.Pages.Components
|
|||
/// 获得/设置 是否分页组件 默认为 false
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool ShowPagination { get; set; }
|
||||
public bool ShowPagination { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 是否显示工具栏 默认为 true
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
查询结果
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<Table @ref="Table" Id="@Id" FixedHeader="@FixedHeader" ShowToolBar="true" ShowExtendButtons="true" ShowRefresh="true" ShowSearch="true" ShowLineNo="true" ShowCheckbox="true" ShowDefaultButtons="true" ShowPagination="true" QueryModel="QueryModel" TItem="TItem" SubmitModalTitle="@SubmitModalTitle" OnQuery="QueryData" OnAdd="OnAdd" OnDelete="OnDelete" OnSave="OnSave" OnResetSearch="OnResetSearch">
|
||||
<Table @ref="Table" Id="@Id" FixedHeader="@FixedHeader" ShowToolBar="true" ShowExtendButtons="true" ShowRefresh="true" ShowSearch="true" ShowCheckbox="true" ShowDefaultButtons="true" QueryModel="QueryModel" TItem="TItem" SubmitModalTitle="@SubmitModalTitle" OnQuery="QueryData" OnAdd="OnAdd" OnDelete="OnDelete" OnSave="OnSave" OnResetSearch="OnResetSearch">
|
||||
<TableToolbarTemplate>
|
||||
@TableToolbarTemplate
|
||||
</TableToolbarTemplate>
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
<CascadingValue Value="this">
|
||||
<nav class="nav align-items-center" aria-label="分页组件">
|
||||
<div class="pagination-bar">
|
||||
显示第 <span>@((PageIndex - 1) * PageItems + 1)</span> 到第 <span>@(Math.Min(PageIndex * PageItems, TotalCount))</span> 条记录,总共 <span>@TotalCount</span> 条记录 每页显示
|
||||
显示第 <span>@((PageIndex - 1) * PageItems + 1)</span> 到第 <span>@(Math.Min(PageIndex * PageItems, TotalCount))</span> 条记录,总共 <span>@TotalCount</span> 条记录
|
||||
@if(PageCount > 1)
|
||||
{
|
||||
<span>每页显示</span>
|
||||
<div class="btn-group dropup">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">@PageItems</button>
|
||||
<div class="dropdown-menu">
|
||||
|
@ -13,7 +16,8 @@
|
|||
}
|
||||
</div>
|
||||
</div>
|
||||
条记录
|
||||
<span>条记录</span>
|
||||
}
|
||||
</div>
|
||||
<ul class="@(PageCount > 1 ? "pagination" : "pagination d-none")">
|
||||
<li class="page-item" @onclick="MovePrev"><div class="page-link" aria-label="上一页"><i class="fa fa-angle-double-left"></i></div></li>
|
||||
|
|
Loading…
Reference in New Issue