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;