33// See the LICENSE file in the project root for more information.
44// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
55
6+ using Microsoft . Extensions . Localization ;
7+
68namespace BootstrapBlazor . Components ;
79
810/// <summary>
@@ -135,6 +137,44 @@ public partial class CardUpload<TValue>
135137 [ Parameter ]
136138 public List < string > ? AllowExtensions { get ; set ; }
137139
140+ /// <summary>
141+ /// 获得/设置 删除前是否显示确认对话框,依赖 <see cref="FileListUploadBase{TValue}.ShowDeleteButton"/> 属性为 true 时有效
142+ /// </summary>
143+ [ Parameter ]
144+ public bool ShowDeleteConfirmButton { get ; set ; }
145+
146+ /// <summary>
147+ /// 获得/设置 删除确认弹窗中确认按钮颜色 默认 <see cref="Color.Danger"/>
148+ /// </summary>
149+ [ Parameter ]
150+ public Color DeleteConfirmButtonColor { get ; set ; } = Color . Danger ;
151+
152+ /// <summary>
153+ /// 获得/设置 删除确认弹窗中确认按钮图标 默认 null 未设置
154+ /// </summary>
155+ [ Parameter ]
156+ public string ? DeleteConfirmButtonIcon { get ; set ; }
157+
158+ /// <summary>
159+ /// 获得/设置 删除确认弹窗中确认文本内容 默认 null 未设置 使用资源文件中内置文字
160+ /// </summary>
161+ [ Parameter ]
162+ public string ? DeleteConfirmContent { get ; set ; }
163+ /// <summary>
164+ /// 获得/设置 删除确认弹窗中确认按钮显示文字 默认 null 未设置
165+ /// </summary>
166+ [ Parameter ]
167+ public string ? DeleteConfirmButtonText { get ; set ; }
168+
169+ /// <summary>
170+ /// 获得/设置 删除确认弹窗中取消按钮显示文字 默认 null 未设置
171+ /// </summary>
172+ [ Parameter ]
173+ public string ? DeleteCloseButtonText { get ; set ; }
174+
175+ [ Inject , NotNull ]
176+ private IStringLocalizer < CardUpload < TValue > > ? Localizer { get ; set ; }
177+
138178 /// <summary>
139179 /// <inheritdoc/>
140180 /// </summary>
@@ -146,6 +186,8 @@ protected override void OnParametersSet()
146186 StatusIcon ??= IconTheme . GetIconByKey ( ComponentIcons . CardUploadStatusIcon ) ;
147187 ZoomIcon ??= IconTheme . GetIconByKey ( ComponentIcons . CardUploadZoomIcon ) ;
148188 RemoveIcon ??= IconTheme . GetIconByKey ( ComponentIcons . CardUploadRemoveIcon ) ;
189+
190+ DeleteConfirmContent ??= Localizer [ "DeleteConfirmContent" ] ;
149191 }
150192
151193 /// <summary>
0 commit comments