fix 修复导入文件无法导入的bug

This commit is contained in:
zyxucp
2024-03-20 13:47:57 +08:00
parent ae6d61ee6d
commit 8d78270007
2 changed files with 14 additions and 1 deletions

View File

@@ -142,7 +142,7 @@
Multiple
Accept="*/*"
BeforeUpload="iKMService.BeforeUpload"
OnSingleCompleted="iKMService.OnSingleCompleted">
OnSingleCompleted="OnSingleCompleted">
<p class="ant-upload-drag-icon">
<Icon Type="inbox" />
</p>

View File

@@ -212,6 +212,19 @@ namespace AntSK.Pages.KmsPage
_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}");