Skip to content

Commit 36f4d18

Browse files
committed
doc: 更新 razor 文件
1 parent acaa8f8 commit 36f4d18

1 file changed

Lines changed: 8 additions & 26 deletions

File tree

src/BootstrapBlazor/Components/Table/Table.razor

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -108,37 +108,19 @@
108108
@RenderHeader(false)
109109
}
110110
<tbody>
111-
@if (ScrollMode == ScrollMode.Virtual)
112-
{
113-
@if (OnQueryAsync != null)
114-
{
115-
<Virtualize @ref="_virtualizeElement"
116-
ItemSize="RowHeight" OverscanCount="@OverscanCount" ItemsProvider="LoadItems"
117-
ItemContent="RenderRow" Placeholder="RenderPlaceholderRow">
118-
</Virtualize>
119-
}
120-
else
121-
{
122-
<Virtualize ItemSize="RowHeight" OverscanCount="@OverscanCount" Items="@Rows"
123-
ChildContent="RenderRow">
124-
</Virtualize>
125-
}
126-
}
127-
else
128-
{
129-
if (InsertRowMode == InsertRowMode.First)
111+
@if (ScrollMode == ScrollMode.Virtual)
130112
{
131-
if (!IsExcel && EditMode == EditMode.EditForm && ShowAddForm)
113+
@if (OnQueryAsync != null)
132114
{
133-
<Virtualize ItemSize="RowHeight" OverscanCount="@OverscanCount" Items="@Items.ToList()"
134-
ChildContent="RenderRow">
115+
<Virtualize @ref="_virtualizeElement"
116+
ItemSize="RowHeight" OverscanCount="@OverscanCount" ItemsProvider="LoadItems"
117+
ItemContent="RenderRow" Placeholder="RenderPlaceholderRow">
135118
</Virtualize>
136119
}
137120
else
138121
{
139-
<Virtualize @ref="_virtualizeElement"
140-
ItemSize="RowHeight" OverscanCount="@OverscanCount" Placeholder="RenderPlaceholderRow"
141-
ItemsProvider="LoadItems" ItemContent="RenderRow">
122+
<Virtualize ItemSize="RowHeight" OverscanCount="@OverscanCount" Items="@Rows"
123+
ChildContent="RenderRow">
142124
</Virtualize>
143125
}
144126
}
@@ -163,7 +145,7 @@
163145
if (RowTemplate != null)
164146
{
165147
var columns = GetVisibleColumns();
166-
@RowTemplate(new(item, columns, ActiveRenderMode))
148+
@RowTemplate(new (item, columns, ActiveRenderMode))
167149
}
168150
else
169151
{

0 commit comments

Comments
 (0)