From 402b4bdfbf2aeb56063d0d18acc4b2cd37543fff Mon Sep 17 00:00:00 2001 From: huangjinysf Date: Thu, 25 Dec 2025 15:03:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=9E=E6=97=B6=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E8=A1=A8=E6=A0=BC=E5=B8=83=E5=B1=80=EF=BC=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=88=97=E5=AE=BD=E5=92=8C=E8=A1=A8=E5=A4=B4=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E6=94=AF=E6=8C=81=E4=B8=A4=E8=A1=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=A7=84=E6=A0=BC=E7=BB=84=E5=90=88=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plan/RealTimeInventory.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/views/plan/RealTimeInventory.vue b/src/views/plan/RealTimeInventory.vue index 92c7824..a1427e0 100644 --- a/src/views/plan/RealTimeInventory.vue +++ b/src/views/plan/RealTimeInventory.vue @@ -25,7 +25,7 @@ @@ -35,11 +35,14 @@ :key="column.key" :label="column.label" :prop="column.prop" - min-width="150" + min-width="100" > + @@ -79,10 +82,14 @@ const dynamicColumns = computed(() => { }))].sort(); // 可选:若需自定义排序,调整这里 return combinations.map(comb => { + // 将组合拆分为 model 和 wire_disc + const hasWireDisc = comb.includes('::'); + const [model, wire_disc] = hasWireDisc ? comb.split('::') : [comb, '']; + return { key: comb, prop: comb, - label: comb.replace('::', '-') // 显示时可替换回 '-' 以保持原样 + label: `${model}
${wire_disc}` // 使用HTML换行符,实现两行显示 }; }); }); @@ -230,6 +237,8 @@ onMounted(() => { color: #606266; font-weight: 600; white-space: nowrap; + text-align: center; /* 可选:居中对齐列头 */ + padding: 8px 0; /* 调整列头内间距,以适应两行显示 */ } :deep(.el-table td) {