mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2024-12-05 13:39:39 +08:00
parent
de3695a397
commit
5789f08303
@ -4962,11 +4962,6 @@
|
||||
"H1": "Table Export",
|
||||
"H2": "By setting <code>ShowExportButton</code> to display the export button, the component has built-in export Excel function",
|
||||
"P1": "The export function provides an export callback method <code>OnExportAsync</code>, which can be used to export data by providing a custom export method. If no data export method is provided, the component will export data according to the injected export service",
|
||||
"P2": "Precautions",
|
||||
"P3": "<code>BootstrapBlazor.TableExport</code>, the component package uses the <code>EPPlus</code> component to provide the function of exporting to <code>Excel</code>, and its component package can be referenced if necessary",
|
||||
"P4": "Nuget Install",
|
||||
"P5": "",
|
||||
"P6": "Use nuget.org to install <a href='https://www.nuget.org/packages?q=BootstrapBlazor.TableExport' target='_blank'><code>BootstrapBlazor.TableExport</code></a> component",
|
||||
"P7": "inject service",
|
||||
"P8": "Add BootstrapBlazor component",
|
||||
"P9": "Add Table Excel export service",
|
||||
|
@ -4966,11 +4966,6 @@
|
||||
"H1": "Table 表格",
|
||||
"H2": "通过设置 <code>ShowExportButton</code> 设置显示导出按钮,组件内置导出Excel功能",
|
||||
"P1": "导出功能提供了导出回调方法 <code>OnExportAsync</code> 使用时可以通过提供自定义的导出方法进行数据导出,如果未提供数据导出方法,组件会根据注入的导出服务进行数据导出",
|
||||
"P2": "注意事项",
|
||||
"P3": "<code>BootstrapBlazor.TableExport</code></a>,组件包使用 <code>EPPlus</code> 组件提供了导出到 <code>Excel</code> 功能,如果需要可以引用其组件包",
|
||||
"P4": "Nuget 包安装",
|
||||
"P5": "使用",
|
||||
"P6": "进行 <code>BootstrapBlazor.TableExport</code> 组件的安装",
|
||||
"P7": "注入服务",
|
||||
"P8": "增加 BootstrapBlazor 组件",
|
||||
"P9": "增加 Table Excel 导出服务",
|
||||
|
@ -5,23 +5,8 @@
|
||||
|
||||
<p>@((MarkupString)@Localizer["P1"].Value)</p>
|
||||
|
||||
<Tips>
|
||||
<div class="mb-2"><b>@Localizer["P2"]:</b></div>
|
||||
<p><a href="https://www.nuget.org/packages?q=BootstrapBlazor.TableExport" target="_blank">@((MarkupString)@Localizer["P3"].Value)</a></p>
|
||||
</Tips>
|
||||
<PackageTips Name="BootstrapBlazor.TableExport" />
|
||||
|
||||
<p><b>@Localizer["P4"]</b></p>
|
||||
|
||||
<p>@((MarkupString)Localizer["P5"].Value) <a href="https://www.nuget.org/packages?q=BootstrapBlazor.TableExport" target="_blank">nuget.org</a> @((MarkupString)@Localizer["P6"].Value)</p>
|
||||
|
||||
<div class="code-label">.NET CLI</div>
|
||||
<Pre class="no-highlight">dotnet add package BootstrapBlazor.TableExport --version @Version</Pre>
|
||||
|
||||
<div class="code-label">PackageReference</div>
|
||||
<Pre class="no-highlight"><PackageReference Include="BootstrapBlazor.TableExport" Version="@Version" /></Pre>
|
||||
|
||||
<div class="code-label">Package Manager</div>
|
||||
<Pre class="no-highlight">Install-Package BootstrapBlazor.TableExport -Version @Version</Pre>
|
||||
|
||||
<p><b>@Localizer["P7"]:</b></p>
|
||||
|
||||
|
@ -11,10 +11,6 @@ namespace BootstrapBlazor.Shared.Samples.Table;
|
||||
/// </summary>
|
||||
public partial class TablesExport
|
||||
{
|
||||
/// <summary>
|
||||
/// 获得/设置 版本号字符串
|
||||
/// </summary>
|
||||
private string Version { get; set; } = "fetching";
|
||||
|
||||
private static IEnumerable<int> PageItemsSource => new int[] { 4, 10, 20 };
|
||||
|
||||
@ -29,10 +25,6 @@ public partial class TablesExport
|
||||
[NotNull]
|
||||
private IStringLocalizer<TablesExport>? Localizer { get; set; }
|
||||
|
||||
[Inject]
|
||||
[NotNull]
|
||||
private VersionService? VersionManager { get; set; }
|
||||
|
||||
[Inject]
|
||||
[NotNull]
|
||||
private ToastService? ToastService { get; set; }
|
||||
@ -75,13 +67,4 @@ public partial class TablesExport
|
||||
{
|
||||
await ToastService.Success("CSV export", "Export CSV data successfully");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OnInitializedAsync 方法
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
Version = await VersionManager.GetVersionAsync("bootstrapblazor.tableexport");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user