Ver código fonte

fix(pms/device): 设备台账设备名称超出省略号

Zimo 2 semanas atrás
pai
commit
57f147ec07
1 arquivos alterados com 20 adições e 1 exclusões
  1. 20 1
      src/views/pms/device/index.vue

+ 20 - 1
src/views/pms/device/index.vue

@@ -279,7 +279,12 @@
                 </template>
 
                 <template #default="scope">
-                  <el-link :underline="false" type="primary" @click="handleDetail(scope.row.id)">
+                  <el-link
+                    class="device-name-link"
+                    :title="scope.row.deviceName"
+                    :underline="false"
+                    type="primary"
+                    @click="handleDetail(scope.row.id)">
                     {{ scope.row.deviceName }}
                   </el-link>
                 </template>
@@ -1125,4 +1130,18 @@ onMounted(async () => {
   height: 100%;
   padding: 0 8px;
 }
+
+:deep(.device-name-link) {
+  display: inline-flex;
+  max-width: 100%;
+  min-width: 0;
+}
+
+:deep(.device-name-link .el-link__inner) {
+  display: block;
+  max-width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
 </style>