From 1ac09e591583dd2ef40ce3c5192ad454b6c9c0f5 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 26 Feb 2026 15:56:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=94=B9=20IsMultiple?= =?UTF-8?q?=20=E9=BB=98=E8=AE=A4=E5=80=BC=E4=B8=BA=20true?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Upload/UploadBase.cs | 41 ++++++++----------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/src/BootstrapBlazor/Components/Upload/UploadBase.cs b/src/BootstrapBlazor/Components/Upload/UploadBase.cs index 12b31f8475a..4850b49e595 100644 --- a/src/BootstrapBlazor/Components/Upload/UploadBase.cs +++ b/src/BootstrapBlazor/Components/Upload/UploadBase.cs @@ -82,11 +82,11 @@ public abstract class UploadBase : ValidateBase, IUpload public bool IsDirectory { get; set; } /// - /// 获得/设置 是否允许多文件上传,默认 false - /// Gets or sets whether to allow multiple file uploads. Default is false + /// 获得/设置 是否允许多文件上传,默认 true + /// Gets or sets whether to allow multiple file uploads. Default is true /// [Parameter] - public bool IsMultiple { get; set; } + public bool IsMultiple { get; set; } = true; /// /// 获得/设置 点击删除按钮时回调此方法,默认 null @@ -103,13 +103,13 @@ public abstract class UploadBase : ValidateBase, IUpload public Func? OnChange { get; set; } /// - /// 获得/设置 已上传文件集合,此集合中数据是用户上传文件集合 - /// Gets or sets the uploaded file collection. This collection contains the files uploaded by the user + /// 获得 已上传文件集合,此集合中数据是用户上传文件集合 + /// Gets the uploaded file collection. This collection contains the files uploaded by the user /// public List UploadFiles { get; } = []; /// - /// 获得 the 集合 of files to be uploaded + /// 获得待上传文件集合 /// Gets the collection of files to be uploaded /// protected List Files => GetUploadFiles(); @@ -296,11 +296,10 @@ protected void Update(UploadFile file) } private List? _filesCache; + /// - /// 获得当前文件集合 Get the files collection - /// - /// Gets当前文件collection Get the files collection - /// + /// 获得当前文件集合 + /// Gets the current files collection /// protected List GetUploadFiles() { @@ -323,32 +322,28 @@ protected List GetUploadFiles() } /// - /// 检查是否可以继续上传文件 Check whether can upload file - /// - /// 检查whether可以继续上传文件 Check whether can upload file - /// + /// 检查是否可以继续上传文件 + /// Checks whether more files can be uploaded /// protected bool CanUpload() { - // 允许多上传 if (IsMultiple) { return !MaxFileCount.HasValue || Files.Count < MaxFileCount; } - // 只允许单个上传 return Files.Count == 0; } /// /// 检查上传按钮是否可用方法 不可用时返回 true - /// 检查上传buttonwhether可用方法 不可用时返回 true + /// Checks whether the upload button is disabled. Returns true when disabled /// protected bool CheckStatus() => IsDisabled || !CanUpload(); /// /// 判断是否显示新建按钮 - /// 判断whetherdisplay新建button + /// Determines whether to show the add button /// protected bool ShowAddButton() { @@ -361,10 +356,8 @@ protected bool ShowAddButton() } /// - /// 清空上传列表方法 Clear the upload files collection - /// - /// 清空上传列表方法 Clear the upload files collection - /// + /// 清空上传列表方法 + /// Clears the upload files collection /// public virtual void Reset() { @@ -376,8 +369,8 @@ public virtual void Reset() } /// - /// append html attribute method - /// append html attribute method + /// 获得上传组件附加 HTML 属性集合 + /// Gets the additional HTML attributes for the upload component /// protected IDictionary GetUploadAdditionalAttributes() { From e73f4379fc6580fdba40a6a769fef86aa30e3fc6 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 26 Feb 2026 15:57:15 +0800 Subject: [PATCH 2/3] chore: bump version 10.4.0-beta02 --- src/BootstrapBlazor/BootstrapBlazor.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index a7f6666540c..640deb09526 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@  - 10.4.0-beta01 + 10.4.0-beta02 From d49b286ef7207b0927be7e0608b4f1adeb9fed74 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 26 Feb 2026 16:00:35 +0800 Subject: [PATCH 3/3] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs b/src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs index 23bff8470bd..aa9b4903c10 100644 --- a/src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs +++ b/src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs @@ -109,10 +109,6 @@ public partial class AvatarUpload .AddClass("disabled", IsDisabled) .Build(); - /// - /// 获得 预览框样式字符串 - /// Gets the preview item style string - /// private string? ItemStyleString => CssBuilder.Default() .AddClass($"width: {Width}px;", Width > 0) .AddClass($"height: {Height}px;", Height > 0 && !IsCircle) @@ -164,7 +160,7 @@ protected override async Task TriggerOnChanged(UploadFile file) /// /// 预览当前头像方法 - /// 预览当前头像方法 + /// Previews the current avatar /// public async Task Preview() {