refactor: Table 组件 ShowPagination 默认值改为 true
This commit is contained in:
parent
a34d621f42
commit
35fb697651
|
@ -141,7 +141,7 @@ namespace Bootstrap.Admin.Pages.Components
|
||||||
/// 获得/设置 是否分页组件 默认为 false
|
/// 获得/设置 是否分页组件 默认为 false
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public bool ShowPagination { get; set; }
|
public bool ShowPagination { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获得/设置 是否显示工具栏 默认为 true
|
/// 获得/设置 是否显示工具栏 默认为 true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
查询结果
|
查询结果
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<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
|
@TableToolbarTemplate
|
||||||
</TableToolbarTemplate>
|
</TableToolbarTemplate>
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
<CascadingValue Value="this">
|
<CascadingValue Value="this">
|
||||||
<nav class="nav align-items-center" aria-label="分页组件">
|
<nav class="nav align-items-center" aria-label="分页组件">
|
||||||
<div class="pagination-bar">
|
<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">
|
<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>
|
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">@PageItems</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
|
@ -13,7 +16,8 @@
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
条记录
|
<span>条记录</span>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
<ul class="@(PageCount > 1 ? "pagination" : "pagination d-none")">
|
<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>
|
<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