Skip to content

Commit c13dd11

Browse files
committed
refactor: 更新逻辑图标与文本可以一起显示
1 parent e12f5cd commit c13dd11

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/BootstrapBlazor/Components/Collapse/Collapse.razor

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@
1919
@item.HeaderTemplate
2020
</div>
2121
}
22-
else if(!string.IsNullOrEmpty(item.Icon))
23-
{
24-
<i class="@GetItemIconString(item)"></i>
25-
}
2622
else
2723
{
28-
<span>@item.Text</span>
24+
if (!string.IsNullOrEmpty(item.Icon))
25+
{
26+
<i class="@GetItemIconString(item)"></i>
27+
}
28+
if (!string.IsNullOrEmpty(item.Text))
29+
{
30+
<span>@item.Text</span>
31+
}
2932
}
3033
</div>
3134
</div>

0 commit comments

Comments
 (0)