From a8e9ba3a019750b786c0e75b7b496f6b17459a94 Mon Sep 17 00:00:00 2001 From: Argo-AscioTech Date: Mon, 11 Dec 2023 00:18:07 +0800 Subject: [PATCH 01/35] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Samples/Table/TablesExport.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor index 9c5c4092e7d..2e72065d6bc 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor @@ -10,7 +10,7 @@ -

@Localizer["TablesExportTips"]:

+

@Localizer["TablesExportTips"]:

public void ConfigureServices(IServiceCollection services)
 {

From f758b3d34f95727304e911dc86b1795a4595f4d0 Mon Sep 17 00:00:00 2001
From: Argo-AscioTech 
Date: Mon, 11 Dec 2023 00:20:45 +0800
Subject: [PATCH 02/35] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20Pdf=20?=
 =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/BootstrapBlazor/Services/DefaultExcelExport.cs | 13 +++++++++++++
 src/BootstrapBlazor/Services/ITableExcelExport.cs  |  8 ++++++++
 2 files changed, 21 insertions(+)

diff --git a/src/BootstrapBlazor/Services/DefaultExcelExport.cs b/src/BootstrapBlazor/Services/DefaultExcelExport.cs
index 34fc31d63fb..0b35917ca83 100644
--- a/src/BootstrapBlazor/Services/DefaultExcelExport.cs
+++ b/src/BootstrapBlazor/Services/DefaultExcelExport.cs
@@ -27,4 +27,17 @@ public Task ExportCsvAsync(IEnumerable items, IEnumerable
+    /// 
+    /// 
+    /// 
+    /// 
+    /// 
+    /// 
+    /// 
+    public Task ExportPdfAsync(IEnumerable items, IEnumerable? cols, string? fileName = null)
+    {
+        return Task.FromResult(false);
+    }
 }
diff --git a/src/BootstrapBlazor/Services/ITableExcelExport.cs b/src/BootstrapBlazor/Services/ITableExcelExport.cs
index 662010c9421..14e386754d3 100644
--- a/src/BootstrapBlazor/Services/ITableExcelExport.cs
+++ b/src/BootstrapBlazor/Services/ITableExcelExport.cs
@@ -24,4 +24,12 @@ public interface ITableExcelExport
     /// 当前可见列数据集合 默认 null 导出全部列
     /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx
     Task ExportCsvAsync(IEnumerable items, IEnumerable? cols, string? fileName = null);
+
+    /// 
+    /// 导出 Pdf 方法
+    /// 
+    /// 导出数据集合
+    /// 当前可见列数据集合 默认 null 导出全部列
+    /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx
+    Task ExportPdfAsync(IEnumerable items, IEnumerable? cols, string? fileName = null);
 }

From e8ecc7a4bd0d6c50cebe266977f91dd129ae463a Mon Sep 17 00:00:00 2001
From: Argo-AscioTech 
Date: Mon, 11 Dec 2023 09:50:30 +0800
Subject: [PATCH 03/35] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0=20Csv=20?=
 =?UTF-8?q?=E7=9B=B8=E5=85=B3=E8=B5=84=E6=BA=90=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 localization/de.json                | 1 +
 localization/es.json                | 1 +
 localization/pt.json                | 1 +
 localization/th-TH.json             | 3 ++-
 localization/zh-TW.json             | 1 +
 src/BootstrapBlazor/Locales/en.json | 1 +
 src/BootstrapBlazor/Locales/zh.json | 1 +
 7 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/localization/de.json b/localization/de.json
index b06a7dd6bc5..cbb22d2c10a 100644
--- a/localization/de.json
+++ b/localization/de.json
@@ -230,6 +230,7 @@
     "ExportToastTitle": "Daten exportieren",
     "ExportToastContent": "Daten exportieren {0}, automatisches Schließen in {1} Sekunden",
     "ExportToastInProgressContent": "Daten exportieren, automatisches Schließen in {0} Sekunden",
+    "ExportCsvDropdownItemText": "MS-Csv",
     "ExportExcelDropdownItemText": "MS-Excel",
     "ExportPdfDropdownItemText": "Pdf",
     "PageInfoText": "{0} - {1} Total {2}",
diff --git a/localization/es.json b/localization/es.json
index 99ebbec61db..ce6336ce572 100644
--- a/localization/es.json
+++ b/localization/es.json
@@ -230,6 +230,7 @@
     "ExportToastTitle": "Exportar datos",
     "ExportToastContent": "Exportar datos {0}, cierre automático en {0} segundos",
     "ExportToastInProgressContent": "Exportar datos, cierre automático en {0} segundos",
+    "ExportCsvDropdownItemText": "MS-Csv",
     "ExportExcelDropdownItemText": "MS-Excel",
     "ExportPdfDropdownItemText": "Pdf",
     "PageInfoText": "{0} - {1} Total {2}",
diff --git a/localization/pt.json b/localization/pt.json
index e8aacbb2984..ae88a27804b 100644
--- a/localization/pt.json
+++ b/localization/pt.json
@@ -230,6 +230,7 @@
     "ExportToastTitle": "Exportar dados",
     "ExportToastContent": "Exportar dados {0}, Fechamento automático em {0} segundos",
     "ExportToastInProgressContent": "Exportar dados, Fechamento automático em {0} segundos",
+    "ExportCsvDropdownItemText": "MS-Csv",
     "ExportExcelDropdownItemText": "MS-Excel",
     "ExportPdfDropdownItemText": "Pdf",
     "PageInfoText": "{0} - {1} Total {2}",
diff --git a/localization/th-TH.json b/localization/th-TH.json
index 3f08d9fbe69..88542ac1fb9 100644
--- a/localization/th-TH.json
+++ b/localization/th-TH.json
@@ -1,4 +1,4 @@
-{
+{
   "BootstrapBlazor.Components.AutoComplete": {
     "NoDataTip": "ไม่มีข้อมูลที่ตรงกัน",
     "PlaceHolder": "กรุณากรอก"
@@ -225,6 +225,7 @@
     "ExportToastTitle": "ส่งออกข้อมูล",
     "ExportToastContent": "ส่งออกข้อมูล {0},{1} ปิดอัตโนมัติหลังจากวินาที",
     "ExportToastInProgressContent": "กำลังส่งออกข้อมูล โปรดทราบภายหลัง, {0} ปิดอัตโนมัติหลังจากวินาที",
+    "ExportCsvDropdownItemText": "ไมโครซอฟท์ Csv รูปแบบ",
     "ExportExcelDropdownItemText": "ไมโครซอฟท์ Excel รูปแบบ",
     "ExportPdfDropdownItemText": "Pdf รูปแบบ",
     "PageInfoText": "{0} - {1} ทั้งหมด {2} บทความ",
diff --git a/localization/zh-TW.json b/localization/zh-TW.json
index 7bd84d686a1..56fa9eabde4 100644
--- a/localization/zh-TW.json
+++ b/localization/zh-TW.json
@@ -239,6 +239,7 @@
     "ExportToastTitle": "匯出資料",
     "ExportToastContent": "匯出資料 {0},{1} 秒後自動關閉",
     "ExportToastInProgressContent": "正在匯出資料,請稍後, {0} 秒後自動關閉",
+    "ExportCsvDropdownItemText": "微軟 Csv 格式",
     "ExportExcelDropdownItemText": "微軟 Excel 格式",
     "ExportPdfDropdownItemText": "Pdf 格式"
   },
diff --git a/src/BootstrapBlazor/Locales/en.json b/src/BootstrapBlazor/Locales/en.json
index 05ac3fb77b9..9c6d878dcb5 100644
--- a/src/BootstrapBlazor/Locales/en.json
+++ b/src/BootstrapBlazor/Locales/en.json
@@ -225,6 +225,7 @@
     "ExportToastTitle": "Export",
     "ExportToastContent": "Export data {0}, auto close after {1}s",
     "ExportToastInProgressContent": "Exporting data, please wait a moment, auto close after {0}s",
+    "ExportCsvDropdownItemText": "MS-Csv",
     "ExportExcelDropdownItemText": "MS-Excel",
     "ExportPdfDropdownItemText": "Pdf",
     "PageInfoText": "{0} - {1} Total {2}",
diff --git a/src/BootstrapBlazor/Locales/zh.json b/src/BootstrapBlazor/Locales/zh.json
index 5ed28328aec..9a0a016ad85 100644
--- a/src/BootstrapBlazor/Locales/zh.json
+++ b/src/BootstrapBlazor/Locales/zh.json
@@ -225,6 +225,7 @@
     "ExportToastTitle": "导出数据",
     "ExportToastContent": "导出数据 {0},{1} 秒后自动关闭",
     "ExportToastInProgressContent": "正在导出数据,请稍后, {0} 秒后自动关闭",
+    "ExportCsvDropdownItemText": "微软 Csv 格式",
     "ExportExcelDropdownItemText": "微软 Excel 格式",
     "ExportPdfDropdownItemText": "Pdf 格式",
     "PageInfoText": "{0} - {1} 共 {2} 条",

From d0d569fb9e9abc93a96fe0e9a171c46fc0f9b07b Mon Sep 17 00:00:00 2001
From: Argo-AscioTech 
Date: Mon, 11 Dec 2023 10:04:39 +0800
Subject: [PATCH 04/35] =?UTF-8?q?refactor:=20=E5=AE=8C=E5=96=84=20IHtml2Pd?=
 =?UTF-8?q?f=20=E6=8E=A5=E5=8F=A3=E6=9C=8D=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../Services/DefaultPdfService.cs             | 20 +++-----------
 .../Services/IHtml2Pdf.cs                     | 27 -------------------
 2 files changed, 4 insertions(+), 43 deletions(-)
 delete mode 100644 src/Extensions/Components/BootstrapBlazor.Html2Pdf/Services/IHtml2Pdf.cs

diff --git a/src/Extensions/Components/BootstrapBlazor.Html2Pdf/Services/DefaultPdfService.cs b/src/Extensions/Components/BootstrapBlazor.Html2Pdf/Services/DefaultPdfService.cs
index e20adabe67d..9f7c731e10a 100644
--- a/src/Extensions/Components/BootstrapBlazor.Html2Pdf/Services/DefaultPdfService.cs
+++ b/src/Extensions/Components/BootstrapBlazor.Html2Pdf/Services/DefaultPdfService.cs
@@ -7,35 +7,23 @@
 namespace BootstrapBlazor.Components;
 
 /// 
-/// 构造函数
+/// 默认 Html to Pdf 实现 
 /// 
 class DefaultPdfService : IHtml2Pdf
 {
     /// 
     /// 
     /// 
-    public async Task ExportDataAsync(string url, PdfOptions? options = null)
+    public async Task PdfDataAsync(string url)
     {
         using var browserFetcher = new BrowserFetcher();
         await browserFetcher.DownloadAsync();
-        await using var browser = await Puppeteer.LaunchAsync(new LaunchOptions() { Headless = true });
-        await using var page = await browser.NewPageAsync();
-        await page.GoToAsync(url);
-        var content = await page.GetContentAsync();
-        return await page.PdfDataAsync(options ?? new PdfOptions());
-    }
 
-    /// 
-    /// 
-    /// 
-    public async Task ExportStreamAsync(string url, PdfOptions? options = null)
-    {
-        using var browserFetcher = new BrowserFetcher();
-        await browserFetcher.DownloadAsync();
         await using var browser = await Puppeteer.LaunchAsync(new LaunchOptions() { Headless = true });
         await using var page = await browser.NewPageAsync();
         await page.GoToAsync(url);
+
         var content = await page.GetContentAsync();
-        return await page.PdfStreamAsync(options ?? new PdfOptions());
+        return await page.PdfDataAsync();
     }
 }
diff --git a/src/Extensions/Components/BootstrapBlazor.Html2Pdf/Services/IHtml2Pdf.cs b/src/Extensions/Components/BootstrapBlazor.Html2Pdf/Services/IHtml2Pdf.cs
deleted file mode 100644
index 54b7bc833fe..00000000000
--- a/src/Extensions/Components/BootstrapBlazor.Html2Pdf/Services/IHtml2Pdf.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-// Website: https://www.blazor.zone or https://argozhang.github.io/
-
-using PuppeteerSharp;
-
-namespace BootstrapBlazor.Components;
-
-/// 
-/// Html export PDF service
-/// 
-public interface IHtml2Pdf
-{
-    /// 
-    /// Export method
-    /// 
-    /// url
-    /// the instance of PdfOptions
-    Task ExportDataAsync(string url, PdfOptions? options = null);
-
-    /// 
-    /// 导出流
-    /// 
-    /// url
-    /// the instance of PdfOptions
-    Task ExportStreamAsync(string url, PdfOptions? options = null);
-}

From 53138e5680f245f1340ec0f9535258876e465068 Mon Sep 17 00:00:00 2001
From: Argo-AscioTech 
Date: Mon, 11 Dec 2023 10:05:26 +0800
Subject: [PATCH 05/35] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=20TableExp?=
 =?UTF-8?q?ort=20=E5=AF=BC=E5=87=BA=E6=9C=8D=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../{ExcelExport.cs => DefaultTableExport.cs} | 39 +++++++++++++++++--
 ...TableExportServiceCollectionExtensions.cs} |  4 +-
 2 files changed, 38 insertions(+), 5 deletions(-)
 rename src/Extensions/Components/BootstrapBlazor.TableExport/{ExcelExport.cs => DefaultTableExport.cs} (70%)
 rename src/Extensions/Components/BootstrapBlazor.TableExport/{TableExcelExportServiceCollectionExtensions.cs => TableExportServiceCollectionExtensions.cs} (83%)

diff --git a/src/Extensions/Components/BootstrapBlazor.TableExport/ExcelExport.cs b/src/Extensions/Components/BootstrapBlazor.TableExport/DefaultTableExport.cs
similarity index 70%
rename from src/Extensions/Components/BootstrapBlazor.TableExport/ExcelExport.cs
rename to src/Extensions/Components/BootstrapBlazor.TableExport/DefaultTableExport.cs
index ad3c091ea0a..205de9a47dc 100644
--- a/src/Extensions/Components/BootstrapBlazor.TableExport/ExcelExport.cs
+++ b/src/Extensions/Components/BootstrapBlazor.TableExport/DefaultTableExport.cs
@@ -7,21 +7,25 @@
 
 namespace BootstrapBlazor.Components;
 
-class ExcelExport : ITableExcelExport
+class DefaultTableExport : ITableExport
 {
     private IServiceProvider ServiceProvider { get; set; }
 
+    private IHtml2Pdf Html2PdfService { get; set; }
+
     /// 
     /// 构造函数
     /// 
     /// 
-    public ExcelExport(IServiceProvider serviceProvider)
+    /// 
+    public DefaultTableExport(IServiceProvider serviceProvider, IHtml2Pdf html2Pdf)
     {
         ServiceProvider = serviceProvider;
+        Html2PdfService = html2Pdf;
     }
 
     /// 
-    /// 导出 Excel 方法
+    /// 导出 方法
     /// 
     /// 导出数据集合
     /// 导出列集合 默认 null 全部导出
@@ -29,8 +33,35 @@ public ExcelExport(IServiceProvider serviceProvider)
     /// 
     public Task ExportAsync(IEnumerable items, IEnumerable? cols = null, string? fileName = null) => InternalExportAsync(items, cols, ExcelType.XLSX, fileName);
 
+    /// 
+    /// 导出 Excel 方法
+    /// 
+    /// 导出数据集合
+    /// 导出列集合 默认 null 全部导出
+    /// 导出后下载文件名
+    /// 
+    public Task ExportExcelAsync(IEnumerable items, IEnumerable? cols = null, string? fileName = null) => InternalExportAsync(items, cols, ExcelType.XLSX, fileName);
+
+    /// 
+    /// 
+    /// 
+    /// 
+    /// 
+    /// 
+    /// 
+    /// 
     public Task ExportCsvAsync(IEnumerable items, IEnumerable? cols, string? fileName = null) => InternalExportAsync(items, cols, ExcelType.CSV, fileName);
 
+    /// 
+    /// 
+    /// 
+    /// 
+    /// 
+    /// 
+    /// 
+    /// 
+    public Task ExportPdfAsync(IEnumerable items, IEnumerable? cols, string? fileName = null) => Task.FromResult(false);
+
     private async Task InternalExportAsync(IEnumerable items, IEnumerable? cols, ExcelType excelType, string? fileName = null)
     {
         var value = new List>();
@@ -87,4 +118,6 @@ private async Task InternalExportAsync(IEnumerable items,
         }
         return ret;
     }
+
+
 }
diff --git a/src/Extensions/Components/BootstrapBlazor.TableExport/TableExcelExportServiceCollectionExtensions.cs b/src/Extensions/Components/BootstrapBlazor.TableExport/TableExportServiceCollectionExtensions.cs
similarity index 83%
rename from src/Extensions/Components/BootstrapBlazor.TableExport/TableExcelExportServiceCollectionExtensions.cs
rename to src/Extensions/Components/BootstrapBlazor.TableExport/TableExportServiceCollectionExtensions.cs
index ba3761f45ca..8c71003ee15 100644
--- a/src/Extensions/Components/BootstrapBlazor.TableExport/TableExcelExportServiceCollectionExtensions.cs
+++ b/src/Extensions/Components/BootstrapBlazor.TableExport/TableExportServiceCollectionExtensions.cs
@@ -7,7 +7,7 @@ namespace Microsoft.Extensions.DependencyInjection;
 /// 
 /// BootstrapBlazor 服务扩展类
 /// 
-public static class TableExcelExportServiceCollectionExtensions
+public static class TableExportServiceCollectionExtensions
 {
     /// 
     /// 增加 BootstrapBlazor 服务
@@ -16,7 +16,7 @@ public static class TableExcelExportServiceCollectionExtensions
     /// 
     public static IServiceCollection AddBootstrapBlazorTableExcelExport(this IServiceCollection services)
     {
-        services.AddTransient();
+        services.AddTransient();
         return services;
     }
 }

From fd6702c2bf3e7ed55fd184c18e58e575af3ce60a Mon Sep 17 00:00:00 2001
From: Argo-AscioTech 
Date: Mon, 11 Dec 2023 10:08:28 +0800
Subject: [PATCH 06/35] =?UTF-8?q?feat:=20=E5=90=88=E5=B9=B6=E5=AF=BC?=
 =?UTF-8?q?=E5=87=BA=E6=9C=8D=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../Services/DefaultPdfExport.cs              | 21 ---------
 ...ltExcelExport.cs => DefaultTableExport.cs} | 11 ++++-
 .../Services/ITableExcelExport.cs             |  1 +
 src/BootstrapBlazor/Services/ITableExport.cs  | 43 +++++++++++++++++++
 .../Services/ITablePdfExport.cs               |  1 +
 5 files changed, 55 insertions(+), 22 deletions(-)
 delete mode 100644 src/BootstrapBlazor/Services/DefaultPdfExport.cs
 rename src/BootstrapBlazor/Services/{DefaultExcelExport.cs => DefaultTableExport.cs} (81%)
 create mode 100644 src/BootstrapBlazor/Services/ITableExport.cs

diff --git a/src/BootstrapBlazor/Services/DefaultPdfExport.cs b/src/BootstrapBlazor/Services/DefaultPdfExport.cs
deleted file mode 100644
index 2356d3f64b6..00000000000
--- a/src/BootstrapBlazor/Services/DefaultPdfExport.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-// Website: https://www.blazor.zone or https://argozhang.github.io/
-
-namespace BootstrapBlazor.Components;
-
-class DefaultPdfExport : ITablePdfExport
-{
-    /// 
-    /// 
-    /// 
-    /// 
-    /// 
-    /// 
-    /// 
-    /// 
-    public Task ExportAsync(IEnumerable items, IEnumerable? cols = null, string? fileName = null) where TItem : class
-    {
-        return Task.FromResult(false);
-    }
-}
diff --git a/src/BootstrapBlazor/Services/DefaultExcelExport.cs b/src/BootstrapBlazor/Services/DefaultTableExport.cs
similarity index 81%
rename from src/BootstrapBlazor/Services/DefaultExcelExport.cs
rename to src/BootstrapBlazor/Services/DefaultTableExport.cs
index 0b35917ca83..9a1626eaa3f 100644
--- a/src/BootstrapBlazor/Services/DefaultExcelExport.cs
+++ b/src/BootstrapBlazor/Services/DefaultTableExport.cs
@@ -4,7 +4,7 @@
 
 namespace BootstrapBlazor.Components;
 
-class DefaultExcelExport : ITableExcelExport
+class DefaultTableExport : ITableExport
 {
     /// 
     /// 
@@ -15,6 +15,15 @@ public Task ExportAsync(IEnumerable items, IEnumerable
+    /// 
+    /// 
+    /// 
+    public Task ExportExcelAsync(IEnumerable items, IEnumerable? cols = null, string? fileName = null)
+    {
+        return Task.FromResult(false);
+    }
+
     /// 
     /// 
     /// 
diff --git a/src/BootstrapBlazor/Services/ITableExcelExport.cs b/src/BootstrapBlazor/Services/ITableExcelExport.cs
index 14e386754d3..bbe5e14be4e 100644
--- a/src/BootstrapBlazor/Services/ITableExcelExport.cs
+++ b/src/BootstrapBlazor/Services/ITableExcelExport.cs
@@ -7,6 +7,7 @@ namespace BootstrapBlazor.Components;
 /// 
 /// Table 组件 Excel 导出接口
 /// 
+[Obsolete("已过期,请使用 ITableExport 代替 Please use ITableExport instead")]
 public interface ITableExcelExport
 {
     /// 
diff --git a/src/BootstrapBlazor/Services/ITableExport.cs b/src/BootstrapBlazor/Services/ITableExport.cs
new file mode 100644
index 00000000000..71a0ca4116f
--- /dev/null
+++ b/src/BootstrapBlazor/Services/ITableExport.cs
@@ -0,0 +1,43 @@
+// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+// Website: https://www.blazor.zone or https://argozhang.github.io/
+
+namespace BootstrapBlazor.Components;
+
+/// 
+/// Table 组件 Excel 导出接口
+/// 
+public interface ITableExport
+{
+    /// 
+    /// 导出 方法
+    /// 
+    /// 导出数据集合
+    /// 当前可见列数据集合 默认 null 导出全部列
+    /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx
+    Task ExportAsync(IEnumerable items, IEnumerable? cols, string? fileName = null);
+
+    /// 
+    /// 导出 Excel 方法
+    /// 
+    /// 导出数据集合
+    /// 当前可见列数据集合 默认 null 导出全部列
+    /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx
+    Task ExportExcelAsync(IEnumerable items, IEnumerable? cols, string? fileName = null);
+
+    /// 
+    /// 导出 Csv 方法
+    /// 
+    /// 导出数据集合
+    /// 当前可见列数据集合 默认 null 导出全部列
+    /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx
+    Task ExportCsvAsync(IEnumerable items, IEnumerable? cols, string? fileName = null);
+
+    /// 
+    /// 导出 Pdf 方法
+    /// 
+    /// 导出数据集合
+    /// 当前可见列数据集合 默认 null 导出全部列
+    /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx
+    Task ExportPdfAsync(IEnumerable items, IEnumerable? cols, string? fileName = null);
+}
diff --git a/src/BootstrapBlazor/Services/ITablePdfExport.cs b/src/BootstrapBlazor/Services/ITablePdfExport.cs
index 47635f04b7f..342b52c9e59 100644
--- a/src/BootstrapBlazor/Services/ITablePdfExport.cs
+++ b/src/BootstrapBlazor/Services/ITablePdfExport.cs
@@ -7,6 +7,7 @@ namespace BootstrapBlazor.Components;
 /// 
 /// Table 组件 Pdf 导出接口
 /// 
+[Obsolete("已过期,统一使用 ITableExport 接口")]
 public interface ITablePdfExport
 {
     /// 

From 701ade93abdd8df1ddd85bcf6a1c1279379aa095 Mon Sep 17 00:00:00 2001
From: Argo-AscioTech 
Date: Mon, 11 Dec 2023 10:08:40 +0800
Subject: [PATCH 07/35] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20IHtml2Pdf=20?=
 =?UTF-8?q?=E6=9C=8D=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/BootstrapBlazor/Services/IHtml2Pdf.cs | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 src/BootstrapBlazor/Services/IHtml2Pdf.cs

diff --git a/src/BootstrapBlazor/Services/IHtml2Pdf.cs b/src/BootstrapBlazor/Services/IHtml2Pdf.cs
new file mode 100644
index 00000000000..da00361bfb8
--- /dev/null
+++ b/src/BootstrapBlazor/Services/IHtml2Pdf.cs
@@ -0,0 +1,17 @@
+// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+// Website: https://www.blazor.zone or https://argozhang.github.io/
+
+namespace BootstrapBlazor.Components;
+
+/// 
+/// Html export PDF service
+/// 
+public interface IHtml2Pdf
+{
+    /// 
+    /// Export method
+    /// 
+    /// url
+    Task PdfDataAsync(string url);
+}

From 72beb0086696012fd9ea15414251c29882c6deb2 Mon Sep 17 00:00:00 2001
From: Argo-AscioTech 
Date: Mon, 11 Dec 2023 10:09:34 +0800
Subject: [PATCH 08/35] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20Csv=20?=
 =?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=8F=82=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs | 6 ++++++
 src/BootstrapBlazor/Components/Table/Table.razor.cs         | 5 +++--
 src/BootstrapBlazor/Options/IconThemeOptions.cs             | 5 +++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs
index ec4410916b3..d1f8bef058d 100644
--- a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs
+++ b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs
@@ -75,6 +75,12 @@ public partial class Table
     [Parameter]
     public string? ExportButtonIcon { get; set; }
 
+    /// 
+    /// 获得/设置 内置导出 Csv 按钮图标
+    /// 
+    [Parameter]
+    public string? CsvExportIcon { get; set; }
+
     /// 
     /// 获得/设置 内置导出 Excel 按钮图标
     /// 
diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.cs b/src/BootstrapBlazor/Components/Table/Table.razor.cs
index a152b971d6f..df8eef83856 100644
--- a/src/BootstrapBlazor/Components/Table/Table.razor.cs
+++ b/src/BootstrapBlazor/Components/Table/Table.razor.cs
@@ -695,8 +695,9 @@ private void OnInitParameters()
         RefreshButtonIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableRefreshButtonIcon);
         CardViewButtonIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableCardViewButtonIcon);
         ColumnListButtonIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableColumnListButtonIcon);
-        ExcelExportIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableExcelExportIcon);
-        PdfExportIcon ??= IconTheme.GetIconByKey(ComponentIcons.TablePdfExportIcon);
+        CsvExportIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableExportCsvIcon);
+        ExcelExportIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableExportExcelIcon);
+        PdfExportIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableExportPdfIcon);
         SearchButtonIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableSearchButtonIcon);
         ResetSearchButtonIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableResetSearchButtonIcon);
         CloseButtonIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableCloseButtonIcon);
diff --git a/src/BootstrapBlazor/Options/IconThemeOptions.cs b/src/BootstrapBlazor/Options/IconThemeOptions.cs
index 914b3dedbc2..9995a7f1f05 100644
--- a/src/BootstrapBlazor/Options/IconThemeOptions.cs
+++ b/src/BootstrapBlazor/Options/IconThemeOptions.cs
@@ -165,8 +165,9 @@ public IconThemeOptions()
         { ComponentIcons.TableRefreshButtonIcon, "fa-solid fa-arrows-rotate" },
         { ComponentIcons.TableCardViewButtonIcon, "fa-solid fa-bars" },
         { ComponentIcons.TableColumnListButtonIcon, "fa-solid fa-table-list" },
-        { ComponentIcons.TableExcelExportIcon, "fa-regular fa-file-excel" },
-        { ComponentIcons.TablePdfExportIcon, "fa-regular fa-file-pdf" },
+        { ComponentIcons.TableExportCsvIcon, "fa-regular fa-file-csv" },
+        { ComponentIcons.TableExportExcelIcon, "fa-regular fa-file-excel" },
+        { ComponentIcons.TableExportPdfIcon, "fa-regular fa-file-pdf" },
         { ComponentIcons.TableSearchButtonIcon, "fa-solid fa-magnifying-glass" },
         { ComponentIcons.TableResetSearchButtonIcon, "fa-regular fa-trash-can" },
         { ComponentIcons.TableCloseButtonIcon, "fa-solid fa-xmark" },

From e7c7225cf282239f1cf67bba3aed267a2d06a663 Mon Sep 17 00:00:00 2001
From: Argo-AscioTech 
Date: Mon, 11 Dec 2023 10:10:02 +0800
Subject: [PATCH 09/35] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20ExportCsvDro?=
 =?UTF-8?q?pdownItemText=20=E5=8F=82=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../Components/Table/Table.razor.Localization.cs            | 1 +
 src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs
index ae29d4cdf5f..80da61e7b5d 100644
--- a/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs
+++ b/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs
@@ -414,6 +414,7 @@ private void OnInitLocalization()
         ExportToastTitle ??= Localizer[nameof(ExportToastTitle)];
         ExportToastContent ??= Localizer[nameof(ExportToastContent)];
         ExportToastInProgressContent ??= Localizer[nameof(ExportToastInProgressContent)];
+        ExportCsvDropdownItemText ??= Localizer[nameof(ExportCsvDropdownItemText)];
         ExportExcelDropdownItemText ??= Localizer[nameof(ExportExcelDropdownItemText)];
         ExportPdfDropdownItemText ??= Localizer[nameof(ExportPdfDropdownItemText)];
         CopyColumnTooltipText ??= Localizer[nameof(CopyColumnTooltipText)];
diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs
index d1f8bef058d..f4ada377437 100644
--- a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs
+++ b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs
@@ -123,6 +123,12 @@ public partial class Table
     [Parameter]
     public RenderFragment>? ExportButtonDropdownTemplate { get; set; }
 
+    /// 
+    /// 获得/设置 内置导出微软 Csv 按钮文本 默认 null 读取资源文件
+    /// 
+    [Parameter]
+    public string? ExportCsvDropdownItemText { get; set; }
+
     /// 
     /// 获得/设置 内置导出微软 Excel 按钮文本 默认 null 读取资源文件
     /// 

From bc345bc5a08ccb17d724423f200a103337187f9d Mon Sep 17 00:00:00 2001
From: Argo-AscioTech 
Date: Mon, 11 Dec 2023 10:10:41 +0800
Subject: [PATCH 10/35] =?UTF-8?q?feat:=20=E5=86=85=E7=BD=AE=E5=AF=BC?=
 =?UTF-8?q?=E5=87=BA=20Csv=20=E6=8C=89=E9=92=AE=E5=8F=82=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/BootstrapBlazor/Components/Table/Table.razor           | 7 +++++++
 .../Components/Table/Table.razor.Toolbar.cs                | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/src/BootstrapBlazor/Components/Table/Table.razor b/src/BootstrapBlazor/Components/Table/Table.razor
index fbeaaf06758..0dc0278e39a 100644
--- a/src/BootstrapBlazor/Components/Table/Table.razor
+++ b/src/BootstrapBlazor/Components/Table/Table.razor
@@ -125,6 +125,13 @@
                                 }
                                 else
                                 {
+                                    if (ShowExportCsvButton)
+                                    {
+                                        
+                                    }
                                     if (ShowExportExcelButton)
                                     {