From 47c6579363b018b3a66d919566737242d8e72411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Wed, 7 Jan 2026 10:44:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=93=E5=BA=93=E4=BA=A4=E9=94=99?= =?UTF-8?q?=E8=A7=86=E5=9B=BE):=20=E8=B0=83=E6=95=B4=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=AE=BD=E5=BA=A6=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化单元格宽度计算,当列数超过10列时固定宽度为160px,并移除最小宽度限制以避免溢出 --- .../views/wms/warehouse/components/WarehouseInterlaced.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/klp-ui/src/views/wms/warehouse/components/WarehouseInterlaced.vue b/klp-ui/src/views/wms/warehouse/components/WarehouseInterlaced.vue index 5c33e759..e67ccd2a 100644 --- a/klp-ui/src/views/wms/warehouse/components/WarehouseInterlaced.vue +++ b/klp-ui/src/views/wms/warehouse/components/WarehouseInterlaced.vue @@ -190,11 +190,13 @@ export default { }, cellWidth() { // 2. 优化cellWidth计算:最小宽度从120调整为80,避免列数过多时宽度过大导致溢出 - if (!this.containerWidth || this.sortedColumnKeys.length === 0) return 120; + if (!this.containerWidth || this.sortedColumnKeys.length === 0) return 160; + // 如果列数超过10列,则宽度固定为160px + if (this.sortedColumnKeys.length > 10) return 160; const availableWidth = Math.max(0, this.containerWidth - 30); // 30是行标尺宽度 const calcWidth = availableWidth / this.sortedColumnKeys.length; // 最小宽度80px,最大不限制(交给滚动容器处理) - return Math.max(120, calcWidth); + return calcWidth; }, halfCellWidth() { return this.cellWidth / 2;