Skip to content

Commit

Permalink
fix 修复导入文件无法导入的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzeyu91 committed Mar 20, 2024
1 parent ae6d61e commit 8d78270
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/AntSK/Pages/KmsPage/KmsDetail.razor
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
Multiple
Accept="*/*"
BeforeUpload="iKMService.BeforeUpload"
OnSingleCompleted="iKMService.OnSingleCompleted">
OnSingleCompleted="OnSingleCompleted">
<p class="ant-upload-drag-icon">
<Icon Type="inbox" />
</p>
Expand Down
13 changes: 13 additions & 0 deletions src/AntSK/Pages/KmsPage/KmsDetail.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
Expand Down

0 comments on commit 8d78270

Please sign in to comment.