-
Is there an existing issue for this?
Describe the bug在使用Table组件时,使用自定义导出下拉框按钮去导出数据,会出现Toast卡住,等到导出数据结束后才显示的异常行为。 <ExportButtonDropdownTemplate Context="ExportContext">
<div class="dropdown-item" @onclick="() => ExcelExportAllAsync(ExportContext)">
<i class="fa-regular fa-file-excel"></i>
<span>导出全部数据 Excel</span>
</div>
</ExportButtonDropdownTemplate>
private async Task ExcelExportAllAsync(ITableExportContext<ProcessNodeDto> context)
{
// 以下这个toast会卡住,直到导出完成才会和下面的toast一起显示
await ToastService.Information("数据导出", "开始导出,请等候...");
var data = Items;
// await Task.Delay(3000); // 假设这里需要好几秒才能完成
var ret = await TableExport.ExportExcelAsync(data, context.Columns, $"Test_{DateTime.Now:yyyyMMddHHmmss}.xlsx");
await ToastService.Success("数据导出", "导出完成");
}
### Expected Behavior
正常应该是先显示“开始导出” toast ,然后进行导出,导出完成再显示“导出完成"的toast 才对。
另外 ,
如果把
await ToastService.Information("数据导出", "开始导出,请等候...");
这个替换成:
await MessageService.Show(new MessageOption()
{
Content = "开始导出,请等候...",
Icon = "fa-solid fa-circle-info"
});
那message的行为是正常的。
### Steps To Reproduce
_No response_
### Exceptions (if any)
_No response_
### .NET Version
8.0.204
### Anything else?
_No response_ |
Beta Was this translation helpful? Give feedback.
Answered by
ArgoZhang
Apr 25, 2024
Replies: 3 comments 1 reply
-
@szzend Thank you for reporting. We will give triage later. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@szzend 无复现工程,无效 |
Beta Was this translation helpful? Give feedback.
0 replies
-
上面说的不太准确,我又测试了下,我的工程是auto模式,在服务端交互模式和webassembly模式下表现又不一样,服务端会失败,webassembly下是卡着一起显示。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你再研究一下。有疑问继续留言。