Skip to content

Commit b8fe562

Browse files
committed
refactor: 更新 InputUpload 组件
1 parent b4eba4c commit b8fe562

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

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

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

112-
return CanUpload();
112+
return !CanUpload();
113113
}
114114

115115
private async Task TriggerDeleteFile()

src/BootstrapBlazor/Components/Upload/UploadBase.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ public abstract class UploadBase<TValue> : ValidateBase<TValue>, IUpload
9999
/// </summary>
100100
protected List<UploadFile> Files => GetUploadFiles();
101101

102+
/// <summary>
103+
/// <inheritdoc/>
104+
/// </summary>
105+
protected override void OnParametersSet()
106+
{
107+
base.OnParametersSet();
108+
109+
_filesCache = null;
110+
}
111+
102112
/// <summary>
103113
/// <inheritdoc/>
104114
/// </summary>

0 commit comments

Comments
 (0)