From 53ad84aa5f5bd96bcf368f91ca8ae76b19f79f78 Mon Sep 17 00:00:00 2001 From: Argo-Tianyi Date: Sun, 23 Jan 2022 00:09:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9C=AA=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=20CardHeader=20=E6=97=B6=E5=B0=B1=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Card/Card.razor | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/BootstrapBlazor/Components/Card/Card.razor b/src/BootstrapBlazor/Components/Card/Card.razor index 3a63776e7..a90b7016a 100644 --- a/src/BootstrapBlazor/Components/Card/Card.razor +++ b/src/BootstrapBlazor/Components/Card/Card.razor @@ -2,27 +2,30 @@ @inherits CardBase
-
- @if(IsCollapsible) - { -
- -
@HeaderText
-
- - } - else - { - if (CardHeader != null) + @if (CardHeader != null || !string.IsNullOrEmpty(HeaderText)) + { +
+ @if (IsCollapsible) { - @CardHeader +
+ +
@HeaderText
+
+ } else { - @HeaderText + if (CardHeader != null) + { + @CardHeader + } + else + { + @HeaderText + } } - } -
+
+ }
@CardBody
-- Gitee