Skip to content

Commit 82a5b54

Browse files
committed
refactor: 重构代码
1 parent 832fd12 commit 82a5b54

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/BootstrapBlazor/Components/Table/Table.razor

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,12 @@
281281
var cellClass = "";
282282
string? value = null;
283283
RenderFragment? valueTemplate = null;
284-
<div class="table-cell @col.CssClass">
284+
var colClass = "table-cell";
285+
if (!string.IsNullOrEmpty(col.CssClass))
286+
{
287+
colClass = $"table-cell {col.CssClass}";
288+
}
289+
<div class="@colClass">
285290
<label>
286291
@col.GetDisplayName()
287292
</label>

0 commit comments

Comments
 (0)