File tree Expand file tree Collapse file tree 6 files changed +76
-0
lines changed Expand file tree Collapse file tree 6 files changed +76
-0
lines changed Original file line number Diff line number Diff line change @@ -384,3 +384,5 @@ src/**/wwwroot/**/uploader
384384
385385# Bootstrap
386386** /BootstrapBlazor /wwwroot /js /bootstrap.blazor.bundle.min.js
387+ /src /BootstrapBlazor /compilerconfig.json
388+ /src /BootstrapBlazor /compilerconfig.json.defaults
Original file line number Diff line number Diff line change 1010 </ItemGroup >
1111
1212 <ItemGroup >
13+ <Content Remove =" compilerconfig.json" />
1314 <Content Remove =" sasscompiler.json" />
1415 <Content Remove =" wwwroot\core\**\*.*" />
1516 <Content Remove =" wwwroot\lib\**\*.css" />
1617 <Content Remove =" wwwroot\scss\**\*.*" />
1718 <Content Remove =" wwwroot\src\**\*.*" />
19+ <None Include =" compilerconfig.json" />
1820 <None Include =" sasscompiler.json" />
1921 <None Include =" wwwroot\core\**\*.*" />
2022 <None Include =" wwwroot\lib\**\*.css" />
Original file line number Diff line number Diff line change 1+ <IntersectionObserver OnIntersecting =" OnIntersecting" Threshold =" 1" AutoUnobserveWhenIntersection =" false" UseElementViewport =" true" >
2+ <IntersectionObserverItem >
3+ @if (NumOfCurrentPage < PageSize )
4+ {
5+ <div class =" nomore" >@NoMoreText </div >
6+ }
7+ else
8+ {
9+ <div class =" loading" >
10+ <Spinner ></Spinner >
11+ </div >
12+ }
13+ </IntersectionObserverItem >
14+ </IntersectionObserver >
15+
16+ @code {
17+ /// <summary >
18+ /// 触底时加载的调用
19+ /// </summary >
20+ [Parameter ] public Func <Task >? OnLoadMore { get ; set ; }
21+ /// <summary >
22+ /// 当前页加载的记录数
23+ /// </summary >
24+ [Parameter ] public int NumOfCurrentPage { get ; set ; }
25+ /// <summary >
26+ /// 分页大小
27+ /// </summary >
28+ [Parameter ] public int PageSize { get ; set ; }
29+ /// <summary >
30+ /// 没有更多时显示的文字
31+ /// </summary >
32+ [Parameter ] public string NoMoreText { get ; set ; } = " 没有更多了" ;
33+ /// <summary >
34+ /// 触底时加载的调用
35+ /// </summary >
36+ async Task OnIntersecting ( IntersectionObserverEntry entry )
37+ {
38+ if (entry .IsIntersecting )
39+ {
40+ if (OnLoadMore != null ) await OnLoadMore .Invoke ();
41+ }
42+ }
43+ }
Original file line number Diff line number Diff line change 1+ .nomore {
2+ display : flex;
3+ justify-content : center;
4+ padding : 0.5rem 0.5rem 1rem ;
5+ color : # aaa ;
6+ font-size : 0.875rem ;
7+ }
8+
9+ .loading {
10+ display : flex;
11+ justify-content : center;
12+ padding : 0.5rem 0.5rem 1rem ;
13+ color : # aaa ;
14+ }
Original file line number Diff line number Diff line change 1+ .nomore {
2+ display : flex ;
3+ justify-content : center ;
4+ padding : .5rem .5rem 1rem ;
5+ color : #aaa ;
6+ font-size : .875rem ;
7+ }
8+
9+ .loading {
10+ display : flex ;
11+ justify-content : center ;
12+ padding : .5rem .5rem 1rem ;
13+ color : #aaa ;
14+ }
You can’t perform that action at this time.
0 commit comments