Skip to content

Commit fc8cb32

Browse files
committed
doc: 更新示例
1 parent d18973c commit fc8cb32

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/BootstrapBlazor.Server/Components/Samples/UploadButtons.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@
5757
<ButtonUpload TValue="string" IsMultiple="@_isMultiple" IsDirectory="@_isDirectory" IsDisabled="@_isDisabled"
5858
ShowProgress="@_showProgress"
5959
ShowUploadFileList="@_showUploadFileList" ShowDownloadButton="@_showDownloadButton"
60-
OnChange="@OnClickToUpload" OnDownload="OnDownload"></ButtonUpload>
60+
OnChange="@OnClickToUpload" OnDownload="OnDownload" OnDelete="OnDelete"></ButtonUpload>
6161
</DemoBlock>

src/BootstrapBlazor.Server/Components/Samples/UploadButtons.razor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ private async Task OnDownload(UploadFile item)
4141
await ToastService.Success("文件下载", $"下载 {item.FileName} 成功");
4242
}
4343

44+
private async Task<bool> OnDelete(UploadFile item)
45+
{
46+
await ToastService.Success("文件操作", $"删除文件 {item.FileName} 成功");
47+
return true;
48+
}
49+
4450
private async Task SaveToFile(UploadFile file)
4551
{
4652
// Server Side 使用

0 commit comments

Comments
 (0)