Skip to content

Commit 128cfcd

Browse files
committed
refactor: 复用 CanUpload 方法
1 parent f4c38e8 commit 128cfcd

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/BootstrapBlazor/Components/Upload/InputUpload.razor.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,7 @@ private bool CheckStatus()
109109
return true;
110110
}
111111

112-
// 允许多上传
113-
if (IsMultiple)
114-
{
115-
return MaxFileCount.HasValue && Files.Count >= MaxFileCount;
116-
}
117-
118-
// 只允许单个上传
119-
return Files.Count > 0;
112+
return CanUpload();
120113
}
121114

122115
private async Task TriggerDeleteFile()

0 commit comments

Comments
 (0)