fix(F006-W17.4.2): DataTable 表头全局强制不换行 + 单位列加宽到 90
用户反馈: 单位列"单/位"两字被挤压换行, 强调"以后标题行的规范不能换行"
根因:
1. DataTable header-cell-style 虽设 whiteSpace:"nowrap", 但 el-table 在列宽挤压下
内部 .cell 容器仍会被 word-break 强制换行 (element-plus 历史 bug)
2. 单位列 width 80 不够, 标题"单位"两字被压
修法:
1. DataTable 加全局 :deep CSS 兜底
:deep(.el-table__header-wrapper .cell) { white-space: nowrap !important; overflow: visible !important }
:deep(.el-table th .cell) { word-break: keep-all }
→ 所有 list 页表头统一不换行
2. 单位列 width 80 → 90, minWidth 80 → 90 (保底宽度足够显示"单位"两字)
效果:
- 全局所有用 DataTable 的页面 (User/Order/Inquiry/Finance/Good/Service 等 33 个)
表头都不换行, 符合规范"标题行不换行"
- 单位列文字"单位"完整在一行
This commit is contained in:
parent
04728fb7a6
commit
6d6ff30624
@ -209,6 +209,16 @@ function onLimitChange(l: number) { emit('limit-change', l) }
|
||||
:deep(.el-table__inner-wrapper) {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
// 表头单元格强制不换行 (兜底, header-cell-style 的 whiteSpace 在某些列宽挤压下失效)
|
||||
:deep(.el-table__header-wrapper .cell),
|
||||
:deep(.el-table__header th .cell) {
|
||||
white-space: nowrap !important;
|
||||
overflow: visible !important;
|
||||
}
|
||||
// 表头内容容器允许溢出不被截断
|
||||
:deep(.el-table th .cell) {
|
||||
word-break: keep-all;
|
||||
}
|
||||
// 去掉 el-table 默认的 border
|
||||
:deep(.el-table--border) {
|
||||
border: none;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user