Skip to content

Commit 706402d

Browse files
committed
feat: 增加阈值参数
1 parent 51234a0 commit 706402d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/BootstrapBlazor/Components/IntersectionObserver/LoadMore.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@namespace BootstrapBlazor.Components
22
@inherits BootstrapModuleComponentBase
33

4-
<IntersectionObserver OnIntersecting="OnIntersecting" Threshold="1" AutoUnobserveWhenIntersection="false">
4+
<IntersectionObserver OnIntersecting="OnIntersecting" Threshold="@Threshold" AutoUnobserveWhenIntersection="false">
55
<IntersectionObserverItem>
66
<div class="bb-intersection-loading">
77
@if (CanLoading)

src/BootstrapBlazor/Components/IntersectionObserver/LoadMore.razor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ namespace BootstrapBlazor.Components;
1212
/// </summary>
1313
public partial class LoadMore
1414
{
15+
/// <summary>
16+
/// 获得/设置 触底元素触发 <see cref="OnLoadMoreAsync"/> 阈值 默认为 1
17+
/// </summary>
18+
[Parameter]
19+
public string Threshold { get; set; } = "1";
20+
1521
/// <summary>
1622
/// 获得/设置 触底回调方法 <see cref="CanLoading"/> 为 true 时才触发此回调方法
1723
/// </summary>

0 commit comments

Comments
 (0)