Skip to content

Commit 295438f

Browse files
committed
refactor: 重构代码
1 parent fe78258 commit 295438f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/BootstrapBlazor/Components/Table/Table.razor.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,10 +1422,14 @@ private static TableCellArgs GetCellArgs(TItem item, ITableColumn col, ref int c
14221422
}
14231423

14241424
var treeItem = TreeNodeCache.Find(TreeRows, item, out var degree);
1425-
return (isFirstColOfTree,
1426-
degree,
1427-
treeItem?.IsExpand ?? false,
1428-
treeItem?.HasChildren ?? false);
1425+
var isExpand = false;
1426+
var hasChildren = false;
1427+
if (treeItem != null)
1428+
{
1429+
isExpand = treeItem.IsExpand;
1430+
hasChildren = treeItem.HasChildren;
1431+
}
1432+
return (isFirstColOfTree, degree, isExpand, hasChildren);
14291433
}
14301434

14311435
/// <summary>

0 commit comments

Comments
 (0)