吴羡
8 小时以前 6f90e7110190d146fde06cf1f5b2272fd49b53d6
src/components/Table/lims-table.vue
@@ -35,7 +35,7 @@
        :label="item.label"
        :prop="item.prop"
        :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true"
        :min-width="columnWidth(item)"
        :min-width="columnMinWidth(item)"
        :sortable="item.sortable ? true : false"
        :type="item.type"
        :width="columnWidth(item)"
@@ -214,6 +214,14 @@
})
function columnWidth(item) {
  if (item.minWidth) return undefined
  return item.dataType === 'action' ? actionColumnWidth.value : item.width
}
// 配置 minWidth 时只约束最小宽度,把剩余空间交给 Element Plus 自动分配。
// 未配置 minWidth 的旧页面继续沿用原有固定 width 行为。
function columnMinWidth(item) {
  if (item.minWidth) return item.minWidth
  return item.dataType === 'action' ? actionColumnWidth.value : item.width
}