Bladeren bron

如果表现为没有值就不显示表现为这个标题

张田田 16 uur geleden
bovenliggende
commit
75c290a276

+ 1 - 1
miniprogram/module/health/components/report-health-status/report-health-status.scss

@@ -126,7 +126,7 @@
 .report-content{
   display: flex;
   flex-direction: column;
-  align-items: center;
+  align-items: flex-start;
   justify-content: space-between;
   // padding: 10px 16px;
 }

+ 1 - 1
miniprogram/module/health/components/report-health-status/report-health-status.wxml

@@ -102,7 +102,7 @@
     
     <view class="report-status-row">
       <view class="content-wrapper report-content">
-        <view wx:if="{{dataset.report.length>0}}" class="status-content">{{dataset.report[1].value}}表现为{{dataset.report[2].value}}</view>
+        <view wx:if="{{dataset.report.length>0}}" class="status-content">{{dataset.report[1].value}}{{dataset.report[2].value ? '表现为' : ''}}{{dataset.report[2].value}}</view>
         <view class="status-box">体质:{{dataset.report[4].value}}</view>
       </view>
       <image class="image-wrapper" src="../../assets/image/health-report.png" mode="aspectFill" />