!3559 fix(#I630WD): update pagination show 0-0 if not data

* chore: bump version 7.0.7
* fix: 修复 Pagination 无数据时显示 1-0 问题
This commit is contained in:
Argo 2022-11-24 14:55:57 +00:00
parent 95936c98d4
commit e9401fe431
3 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Version>7.0.7-beta02</Version>
<Version>7.0.7</Version>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">

View File

@ -911,7 +911,7 @@ RenderFragment RenderSearch =>
RenderFragment RenderPageInfo =>
@<div class="table-page-info">
<div class="me-2">@Localizer[nameof(PageInfoText), (PageIndex - 1) * PageItems + 1, (PageIndex - 1) * PageItems + Rows.Count, TotalCount]</div>
<div class="me-2">@PageInfoLabelString</div>
<Select Items="@GetPageItemsSource()" Value="PageItems" OnValueChanged="@OnPageItemsValueChanged" />
</div>;

View File

@ -125,6 +125,10 @@ public partial class Table<TItem> : ITable where TItem : class, new()
private bool IsShowFooter => ShowFooter && (Rows.Any() || !IsHideFooterWhenNoData);
private int PageStartIndex => Rows.Any() ? (PageIndex - 1) * PageItems + 1 : 0;
private string PageInfoLabelString => Localizer[nameof(PageInfoText), PageStartIndex, (PageIndex - 1) * PageItems + Rows.Count, TotalCount];
/// <summary>
/// 获得/设置 列拷贝 Tooltip 文字
/// </summary>