Skip to content

Commit d049364

Browse files
committed
feat: 同步 bs 实现
1 parent 9c3ff4f commit d049364

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<div class="@ButtonGroupClassString" role="group">
1414
@foreach (var item in Items)
1515
{
16-
<DynamicElement TagName="span" TriggerClick="!IsDisabled" OnClick="() => OnClick(item)" class="@GetButtonItemClassString(item)">
16+
<DynamicElement TagName="span" TriggerClick="!IsDisabled" OnClick="() => OnClick(item)"
17+
class="@GetButtonItemClassString(item)">
1718
@item.Text
1819
</DynamicElement>
1920
}

src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public partial class CheckboxList<TValue> : ValidateBase<TValue>
3838
.Build();
3939

4040
private string? GetButtonItemClassString(SelectedItem item) => CssBuilder.Default("btn")
41-
.AddClass($"active bg-{Color.ToDescriptionString()}", CurrentValueAsString.Split(',', StringSplitOptions.RemoveEmptyEntries).Contains(item.Value))
41+
.AddClass($"btn-outline-{Color.ToDescriptionString()}")
42+
.AddClass($"active", CurrentValueAsString.Split(',', StringSplitOptions.RemoveEmptyEntries).Contains(item.Value))
4243
.Build();
4344

4445
/// <summary>

src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
}
3939

4040
.btn-group {
41-
border: var(--bs-border-width) solid var(--bs-border-color);
4241
display: inline-flex;
4342
flex: 0 !important;
4443
flex-wrap: nowrap;

0 commit comments

Comments
 (0)