Просмотр исходного кода

健康档案中基础信息显示错乱

张田田 14 часов назад
Родитель
Сommit
c52f38ce30

+ 20 - 1
miniprogram/module/health/components/report-health-patient/report-health-patient.scss

@@ -89,7 +89,26 @@
       display: flex;
       align-items: center;
       white-space: nowrap; /* 防止真机 50% 宽度下换行 */
-      min-width: 0; /* 修复部分机型 flex 子项计算导致的换行 */
+      min-width: 0; 
+    }
+  }
+
+  .tag-row {
+    display: block;
+    line-height: 1.6;
+    margin-bottom: 5px;
+    .tag-row__label {
+      display: inline-block;
+      vertical-align: middle;
+      white-space: nowrap;
+      color: #8c8c8c;
+      margin-right: 8px;
+    }
+
+    t-tag {
+      display: inline-block;
+      vertical-align: middle;
+      margin: 0 8px 12px 0;
     }
   }
 }

+ 4 - 4
miniprogram/module/health/components/report-health-patient/report-health-patient.wxml

@@ -64,15 +64,15 @@
           <text>{{dictionary.label($dictionaries, 'sys_yes_no', dataset.smokeState)}}</text>
         </view>
       </view>
-      <view class="row" style="display:flex">
-        <text style="color:#8C8C8C">喜好口味:</text>
+      <view class="row tag-row">
+        <text class="tag-row__label">喜好口味:</text>
         <t-tag t-class="tag" variant="outline" wx:for="{{hobbyFlavor}}" wx:key="*this">
           {{dictionary.label($dictionaries, 'hobby_flavor', item)}}
         </t-tag>
         <t-tag variant="outline" wx:if="{{!hobbyFlavor.length}}">无</t-tag>
       </view>
-      <view class="row" style="display:flex">
-        <text style="color:#8C8C8C">食物过敏:</text>
+      <view class="row tag-row">
+        <text class="tag-row__label">食物过敏:</text>
         <t-tag t-class="tag" variant="outline" wx:for="{{foodAllergy}}" wx:key="*this">
           {{dictionary.label($dictionaries, 'food_allergy', item)}}
         </t-tag>