Skip to content

Commit fd71c49

Browse files
committed
refactor: 更改滚动条位置
1 parent 6616a6f commit fd71c49

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/BootstrapBlazor/Components/TreeView/TreeView.razor

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ else
3939
}
4040
else
4141
{
42-
@SearchTemplate
42+
<div class="tree-search">
43+
@SearchTemplate
44+
</div>
4345
}
4446
}
4547
@if (IsVirtualize)
4648
{
47-
<div class="tree-root is-virtual" tabindex="0">
49+
<div class="tree-root scroll is-virtual" tabindex="0">
4850
<Virtualize ItemSize="RowHeight" OverscanCount="10" Items="@Rows">
4951
<ItemContent>
5052
@RenderTreeRow(context)
@@ -54,7 +56,7 @@ else
5456
}
5557
else
5658
{
57-
<div class="tree-root" tabindex="0">
59+
<div class="tree-root scroll" tabindex="0">
5860
@foreach (var item in Rows)
5961
{
6062
@RenderTreeRow(item)

src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public partial class TreeView<TItem> : IModelEqualityComparer<TItem>
1717
/// <summary>
1818
/// 获得 按钮样式集合
1919
/// </summary>
20-
private string? ClassString => CssBuilder.Default("tree-view scroll")
20+
private string? ClassString => CssBuilder.Default("tree-view")
2121
.AddClass("is-fixed-search", ShowSearch && IsFixedSearch)
2222
.AddClassFromAttributes(AdditionalAttributes)
2323
.Build();

0 commit comments

Comments
 (0)