Skip to content

Commit 9e44f70

Browse files
committed
refactor: 更新 MaxFileCount 逻辑
1 parent 5491435 commit 9e44f70

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/BootstrapBlazor/Components/Upload/UploadBase.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ protected async Task OnFileChange(InputFileChangeEventArgs args)
147147
if (MaxFileCount.HasValue)
148148
{
149149
fileCount = MaxFileCount.Value;
150-
}
151150

152-
// 计算剩余可上传数量
153-
fileCount = fileCount - Files.Count;
154-
if (fileCount <= 0)
155-
{
156-
// 如果剩余可上传数量小于等于 0 则不允许继续上传
157-
return;
151+
// 计算剩余可上传数量
152+
fileCount = fileCount - Files.Count;
153+
if (fileCount <= 0)
154+
{
155+
// 如果剩余可上传数量小于等于 0 则不允许继续上传
156+
return;
157+
}
158158
}
159159

160160
var items = args.GetMultipleFiles(args.FileCount).Take(fileCount).Select(f =>

0 commit comments

Comments
 (0)