Parcourir la source

监控详情颜色

lipenghui il y a 12 heures
Parent
commit
e6d92a8ceb
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      src/views/pms/device/monitor/TdDeviceLabel.vue

+ 7 - 1
src/views/pms/device/monitor/TdDeviceLabel.vue

@@ -5,7 +5,10 @@
       v-for="(tag, index) in tags"
       :key="index"
       class="tag-item"
-      :class="{ 'active': selectedIndex === index }"
+      :class="{
+        'active': selectedIndex === index,
+        'alarm-red': tag.ifAlarm === 'alarm'  // 新增的条件类
+      }"
       @click="selectTag(index)"
     >
       <span class="property">{{ tag.modelName }}</span>
@@ -109,4 +112,7 @@ const selectTag = (index) => {
   cursor: not-allowed;
   filter: grayscale(0.8);
 }
+.tag-item.alarm-red {
+  background-color: #f3afaf;
+}
 </style>