Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

feat: 表格分页功能 #241

Merged
merged 5 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
288 changes: 215 additions & 73 deletions doc/TDesign.Docs.ServerSide/TDesign.xml

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions doc/TDesign.Docs.Shared/Components/ComponentAPI.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
{
<h3 style="font-weight: 700;font-size: 20px;line-height: 28px;margin: 48px 0 8px;display: flex;align-items: center;">@Title 的参数</h3>
<TTable TItem="Parameter" Data="Parameters">
<FieldColumn Value="context?.Name" Title="名称" AdditionalStyle="width:200px"></FieldColumn>
<FieldColumn Title="类型">
<TTableFieldColumn Value="context?.Name" Title="名称" style="width:200px"></TTableFieldColumn>
<TTableFieldColumn Title="类型">
<code>@context?.Type</code>
</FieldColumn>
</TTableFieldColumn>

<FieldColumn Value="context?.Description" Title="描述"></FieldColumn>
<FieldColumn Value="context?.Default" Title="默认值" AdditionalStyle="width:100px"></FieldColumn>
<FieldColumn Title="必填" AdditionalStyle="width:80px">
<TTableFieldColumn Value="context?.Description" Title="描述"></TTableFieldColumn>
<TTableFieldColumn Value="context?.Default" Title="默认值" style="width:100px"></TTableFieldColumn>
<TTableFieldColumn Title="必填" style="width:80px">
@if (context.Required)
{
<TTag Theme="Theme.Danger">Y</TTag>
Expand All @@ -22,7 +22,7 @@
{
<TTag Type="TagType.Outline" Theme="Theme.Success">N</TTag>
}
</FieldColumn>
</TTableFieldColumn>

</TTable>
}
Expand All @@ -31,17 +31,17 @@

<h3 style="font-weight: 700;font-size: 20px;line-height: 28px;margin: 48px 0 8px;display: flex;align-items: center;">@Title 的方法</h3>
<TTable TItem="Method" Data="Methods">
<FieldColumn Value="context?.Name" Title="名称" AdditionalStyle="width:200px"></FieldColumn>
<FieldColumn Value="context?.Parameter" Title="参数" AdditionalStyle="width:200px"></FieldColumn>
<FieldColumn Value="context?.Description" Title="描述"></FieldColumn>
<TTableFieldColumn Value="context?.Name" Title="名称" AdditionalStyle="width:200px"></TTableFieldColumn>
<TTableFieldColumn Value="context?.Parameter" Title="参数" AdditionalStyle="width:200px"></TTableFieldColumn>
<TTableFieldColumn Value="context?.Description" Title="描述"></TTableFieldColumn>
</TTable>
}
</div>
@code {
/// <summary>
/// 标题
/// </summary>
string? Title => TypeToCSharp(Component);
[Parameter] public string? Title { get; set; }
/// <summary>
/// 参数
/// </summary>
Expand All @@ -59,9 +59,9 @@
[Inject] HttpClient? _client { get; set; }
[Inject] IJSRuntime JS { get; set; }
bool IsWasm => JS is IJSInProcessRuntime;

protected override async Task OnParametersSetAsync()
{
Title ??= TypeToCSharp(Component);
await InitApiAsync();
}
private async Task InitApiAsync()
Expand Down
2 changes: 1 addition & 1 deletion doc/TDesign.Docs.Shared/Components/Example.razor
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
<div class="footer">
<div class="btn">
<TIcon AdditionalCssClass="@BtnClass" Name="IconName.Code" Size="24px" @onclick="e=>ToogleCode()" style="display: flex;justify-content: space-evenly;align-items: center;" />
<TIcon AdditionalClass="@BtnClass" Name="IconName.Code" Size="24px" @onclick="e=>ToogleCode()" style="display: flex;justify-content: space-evenly;align-items: center;" />
</div>
</div>
<div class="@CodeClass" style="@GetStyle()">
Expand Down
Loading