From 8d7827000713eb2da270d9aa0bc6918c17fc1073 Mon Sep 17 00:00:00 2001 From: zyxucp <286513187@qq.com> Date: Wed, 20 Mar 2024 13:47:57 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=97=A0=E6=B3=95=E5=AF=BC=E5=85=A5=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AntSK/Pages/KmsPage/KmsDetail.razor | 2 +- src/AntSK/Pages/KmsPage/KmsDetail.razor.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/AntSK/Pages/KmsPage/KmsDetail.razor b/src/AntSK/Pages/KmsPage/KmsDetail.razor index d0b3e3eb..da40949a 100644 --- a/src/AntSK/Pages/KmsPage/KmsDetail.razor +++ b/src/AntSK/Pages/KmsPage/KmsDetail.razor @@ -142,7 +142,7 @@ Multiple Accept="*/*" BeforeUpload="iKMService.BeforeUpload" - OnSingleCompleted="iKMService.OnSingleCompleted"> + OnSingleCompleted="OnSingleCompleted">
diff --git a/src/AntSK/Pages/KmsPage/KmsDetail.razor.cs b/src/AntSK/Pages/KmsPage/KmsDetail.razor.cs index 8ae404de..4d00ec35 100644 --- a/src/AntSK/Pages/KmsPage/KmsDetail.razor.cs +++ b/src/AntSK/Pages/KmsPage/KmsDetail.razor.cs @@ -212,6 +212,19 @@ private void FileShowModal() _fileVisible = true; } + private void OnSingleCompleted(UploadInfo fileinfo) + { + if (fileinfo.File.State == UploadState.Success) + { + //文件列表 + fileList.Add(new FileInfoModel() + { + FileName = fileinfo.File.FileName, + FilePath = fileinfo.File.Url = fileinfo.File.Response + }); + } + } + private void FileDetail(string fileid) { NavigationManager.NavigateTo($"/kms/detaillist/{KmsId}/{fileid}");