diff --git a/src/BootstrapBlazor.Shared/Components/Samples/Selects.razor b/src/BootstrapBlazor.Shared/Components/Samples/Selects.razor
index 4fee4046f58..093dd481024 100644
--- a/src/BootstrapBlazor.Shared/Components/Samples/Selects.razor
+++ b/src/BootstrapBlazor.Shared/Components/Samples/Selects.razor
@@ -442,7 +442,7 @@
@((MarkupString)Localizer["SelectsGenericDesc"].Value)
-
+
diff --git a/src/BootstrapBlazor.Shared/Components/Samples/Selects.razor.cs b/src/BootstrapBlazor.Shared/Components/Samples/Selects.razor.cs
index b5acb838af6..6bb60dc47fb 100644
--- a/src/BootstrapBlazor.Shared/Components/Samples/Selects.razor.cs
+++ b/src/BootstrapBlazor.Shared/Components/Samples/Selects.razor.cs
@@ -242,7 +242,7 @@ private Task OnTimeZoneValueChanged(string timeZoneId)
return Task.CompletedTask;
}
- private readonly List
> _genericItems =
+ private readonly List> _genericItems =
[
new() { Text = "Foo1", Value = new Foo() { Id = 1, Address = "Address_F001" } },
new() { Text = "Foo2", Value = new Foo() { Id = 2, Address = "Address_F002" } },
diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj
index 3bd145a169b..b90291ec018 100644
--- a/src/BootstrapBlazor/BootstrapBlazor.csproj
+++ b/src/BootstrapBlazor/BootstrapBlazor.csproj
@@ -1,7 +1,7 @@
- 9.1.3-beta05
+ 9.1.3-beta06
diff --git a/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs b/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs
index 3198a1ef19c..84bdc47bade 100644
--- a/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs
+++ b/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs
@@ -36,6 +36,19 @@ public partial class MultiSelect
.AddClass("d-none", SelectedItems.Count != 0)
.Build();
+ ///
+ /// 获得/设置 绑定数据集
+ ///
+ [Parameter]
+ [NotNull]
+ public IEnumerable? Items { get; set; }
+
+ ///
+ /// 获得/设置 选项模板
+ ///
+ [Parameter]
+ public RenderFragment? ItemTemplate { get; set; }
+
///
/// 获得/设置 组件 PlaceHolder 文字 默认为 点击进行多选 ...
///
diff --git a/src/BootstrapBlazor/Components/Select/Select.razor b/src/BootstrapBlazor/Components/Select/Select.razor
index f25cc0d349d..ce7ae4202c1 100644
--- a/src/BootstrapBlazor/Components/Select/Select.razor
+++ b/src/BootstrapBlazor/Components/Select/Select.razor
@@ -1,7 +1,7 @@
@namespace BootstrapBlazor.Components
@using Microsoft.AspNetCore.Components.Web.Virtualization
@typeparam TValue
-@inherits SingleSelectBase
+@inherits SelectBase
@attribute [BootstrapModuleAutoLoader(JSObjectReference = true)]
@if (IsShowLabel)
diff --git a/src/BootstrapBlazor/Components/Select/Select.razor.cs b/src/BootstrapBlazor/Components/Select/Select.razor.cs
index 8629acb5ac5..8ee49a0f29e 100644
--- a/src/BootstrapBlazor/Components/Select/Select.razor.cs
+++ b/src/BootstrapBlazor/Components/Select/Select.razor.cs
@@ -12,6 +12,7 @@ namespace BootstrapBlazor.Components;
/// Select 组件实现类
///
///
+[ExcludeFromCodeCoverage]
public partial class Select : ISelect, IModelEqualityComparer
{
[Inject]
@@ -50,7 +51,7 @@ public partial class Select : ISelect, IModelEqualityComparer
///
///
private string? ActiveItem(SelectedItem item) => CssBuilder.Default("dropdown-item")
- .AddClass("active", Match(item))
+ .AddClass("active", item.Value == CurrentValueAsString)
.AddClass("disabled", item.IsDisabled)
.Build();
@@ -191,6 +192,55 @@ public partial class Select : ISelect, IModelEqualityComparer
[NotNull]
private Virtualize? VirtualizeElement { get; set; }
+ ///
+ /// 获得/设置 绑定数据集
+ ///
+ [Parameter]
+ [NotNull]
+ public IEnumerable? Items { get; set; }
+
+ ///
+ /// 获得/设置 选项模板
+ ///
+ [Parameter]
+ public RenderFragment? ItemTemplate { get; set; }
+
+ ///
+ /// 获得/设置 下拉框项目改变前回调委托方法 返回 true 时选项值改变,否则选项值不变
+ ///
+ [Parameter]
+ public Func>? OnBeforeSelectedItemChange { get; set; }
+
+ ///
+ /// SelectedItemChanged 回调方法
+ ///
+ [Parameter]
+ public Func? OnSelectedItemChanged { get; set; }
+
+ ///
+ /// 获得/设置 Swal 图标 默认 Question
+ ///
+ [Parameter]
+ public SwalCategory SwalCategory { get; set; } = SwalCategory.Question;
+
+ ///
+ /// 获得/设置 Swal 标题 默认 null
+ ///
+ [Parameter]
+ public string? SwalTitle { get; set; }
+
+ ///
+ /// 获得/设置 Swal 内容 默认 null
+ ///
+ [Parameter]
+ public string? SwalContent { get; set; }
+
+ ///
+ /// 获得/设置 Footer 默认 null
+ ///
+ [Parameter]
+ public string? SwalFooter { get; set; }
+
[Inject]
[NotNull]
private IStringLocalizer