File tree Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Razor" >
22
33 <PropertyGroup >
4- <Version >9.5.0-beta09 </Version >
4+ <Version >9.4.10 </Version >
55 </PropertyGroup >
66
77 <ItemGroup >
Original file line number Diff line number Diff line change 4747 @if (IsVirtualize )
4848 {
4949 <div class =" tree-root scroll is-virtual" tabindex =" 0" >
50- <Virtualize ItemSize =" RowHeight" OverscanCount =" 10 " Items =" @Rows" >
50+ <Virtualize ItemSize =" RowHeight" OverscanCount =" OverscanCount " Items =" @Rows" >
5151 @RenderRow(context)
5252 </Virtualize >
5353 </div >
Original file line number Diff line number Diff line change @@ -218,11 +218,18 @@ public partial class TreeView<TItem> : IModelEqualityComparer<TItem>
218218 public bool IsVirtualize { get ; set ; }
219219
220220 /// <summary>
221- /// Gets or sets the row height for virtual scrolling. Default is 38 .
221+ /// Gets or sets the row height for virtual scrolling. Default is 29f .
222222 /// </summary>
223- /// <remarks>Effective when <see cref="ScrollMode "/> is set to Virtual .</remarks>
223+ /// <remarks>Effective when <see cref="IsVirtualize "/> is set to true .</remarks>
224224 [ Parameter ]
225- public float RowHeight { get ; set ; } = 38f ;
225+ public float RowHeight { get ; set ; } = 29f ;
226+
227+ /// <summary>
228+ /// Gets or sets the overscan count for virtual scrolling. Default is 10.
229+ /// </summary>
230+ /// <remarks>Effective when <see cref="IsVirtualize"/> is set to true.</remarks>
231+ [ Parameter ]
232+ public int OverscanCount { get ; set ; } = 10 ;
226233
227234 /// <summary>
228235 /// Gets or sets the toolbar content template. Default is null.
Original file line number Diff line number Diff line change @@ -132,13 +132,12 @@ public async Task OnCancel_Ok()
132132 var downs = cut . FindAll ( ".time-spinner-arrow.fa-angle-down" ) ;
133133 await cut . InvokeAsync ( ( ) => downs [ 0 ] . Click ( ) ) ;
134134 await cut . InvokeAsync ( ( ) => cut . Find ( ".time-panel-btn.confirm" ) . Click ( ) ) ;
135- await Task . Delay ( 1000 ) ;
136- var buttons = cut . FindAll ( ".timer-buttons button" ) ;
135+
137136 // pause
137+ var buttons = cut . FindAll ( ".timer-buttons button" ) ;
138138 Assert . True ( buttons [ 1 ] . ClassList . Contains ( "btn-warning" ) ) ;
139139 Assert . Equal ( "暂停" , buttons [ 1 ] . GetInnerText ( ) ) ;
140140 await cut . InvokeAsync ( ( ) => buttons [ 1 ] . Click ( ) ) ;
141- await Task . Delay ( 500 ) ;
142141
143142 // resume
144143 buttons = cut . FindAll ( ".timer-buttons button" ) ;
@@ -156,6 +155,5 @@ public async Task OnCancel_Ok()
156155 downs = cut . FindAll ( ".time-spinner-arrow.fa-angle-down" ) ;
157156 await cut . InvokeAsync ( ( ) => downs [ 0 ] . Click ( ) ) ;
158157 await cut . InvokeAsync ( ( ) => cut . Find ( ".time-panel-btn.confirm" ) . Click ( ) ) ;
159- await Task . Delay ( 1000 ) ;
160158 }
161159}
You can’t perform that action at this time.
0 commit comments