Преглед изворни кода

fix: 产物状态修改为正确样式

Jinyao пре 5 година
родитељ
комит
ed4589ecd0
1 измењених фајлова са 1 додато и 6 уклоњено
  1. 1 6
      src/views/Project/Pipeline.vue

+ 1 - 6
src/views/Project/Pipeline.vue

@@ -288,12 +288,7 @@
           width="100"
           width="100"
         >
         >
           <template #default="scope">
           <template #default="scope">
-            <template v-if="scope.row.status === '正常'">
-              <ElTag type="success">{{scope.row.status}}</ElTag>
-            </template>
-            <template v-else>
-              <ElTag type="danger">{{scope.row.status}}</ElTag>
-            </template>
+            <ElTag :type="scope.row.status.indexOf('正常') > -1 ? 'success' : 'danger'">{{scope.row.status}}</ElTag>
           </template>
           </template>
         </ElTableColumn>
         </ElTableColumn>
         <ElTableColumn width="60">
         <ElTableColumn width="60">