fix(module-management): 参与勾选列表头与内容居中——对齐「启用」列

- 表头:参与列补 headerAlign: 'center'(stk-table 中 th 与 td 的对齐分开配置,
  此前仅 align 只作用于内容,表头走 getHeaderAlign 默认 left)
- 内容:.mm-part-cell 补 height:100% + line-height:1,与 FmsTable 内置
  勾选列 .fms-checkbox 同构(铺满单元格后 flex 居中)
This commit is contained in:
oneao committed 2026-08-30 21:28:27 +08:00
1 parent ac346f929c
commit 59b91e9a7b
2 files changed
+19 -5

No files matched your search

@@ -156,13 +156,23 @@ function buildColumns() {
{ dataIndex: 'b_default_value', title: '默认值', width: 120, editor: { type: 'input' } },
{ dataIndex: 'b_i18n', title: '多语言键', width: 220, customCell: I18nKeyCell },
]
// 表单参与列仅数据模块展示(查询模块无表单设计)
// 表单参与列仅数据模块展示(查询模块无表单设计)。
// align 管内容 td、headerAlign 管表头 th(stk-table 分开处理,见 FmsTable.getHeaderAlign)
const participationColumns = [
...(props.moduleType === 'data'
? [{ dataIndex: '__form', title: '表单', width: 64, align: 'center', customCell: FormCell }]
? [
{
dataIndex: '__form',
title: '表单',
width: 64,
align: 'center',
headerAlign: 'center',
customCell: FormCell,
},
]
: []),
{ dataIndex: '__list', title: '列表', width: 64, align: 'center', customCell: ListCell },
{ dataIndex: '__query', title: '查询', width: 64, align: 'center', customCell: QueryCell },
{ dataIndex: '__list', title: '列表', width: 64, align: 'center', headerAlign: 'center', customCell: ListCell },
{ dataIndex: '__query', title: '查询', width: 64, align: 'center', headerAlign: 'center', customCell: QueryCell },
]
const tailColumns = [
{
@@ -1,7 +1,11 @@
/* 字段参与开关单元格(ParticipationCell):随 JS 模块全局引入 */
/* 字段参与勾选单元格(ParticipationCell):随 JS 模块全局引入。
* 与 FmsTable 内置勾选列(.fms-checkbox)同构:铺满单元格后 flex 居中,
* 垂直方向由 height:100% 与行高对齐。 */
.mm-part-cell {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
line-height: 1;
}