Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 48 additions & 19 deletions packages/vtable/src/scenegraph/group-creater/cell-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,25 +423,54 @@ export function createCell(
);
}
} else if (type === 'radio') {
const createRadioCellGroup = Factory.getFunction('createRadioCellGroup') as CreateRadioCellGroup;
cellGroup = createRadioCellGroup(
null,
columnGroup,
0,
y,
col,
row,
colWidth,
cellWidth,
cellHeight,
padding,
textAlign,
textBaseline,
table,
cellTheme,
define as RadioColumnDefine,
range
);
const isAggregation =
'isAggregation' in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row);
const isSeriesNumber = table.internalProps.layoutMap.isSeriesNumber(col, row);
if (isAggregation && isSeriesNumber) {
// 合计行的行序号列不应渲染单选框,降级为普通文本单元格(与 checkbox 保持一致)
const createTextCellGroup = Factory.getFunction('createTextCellGroup') as CreateTextCellGroup;
cellGroup = createTextCellGroup(
table,
value,
columnGroup,
0,
y,
col,
row,
colWidth,
cellWidth,
cellHeight,
padding,
textAlign,
textBaseline,
false,
undefined,
true,
cellTheme,
range,
isAsync
);
} else {
const createRadioCellGroup = Factory.getFunction('createRadioCellGroup') as CreateRadioCellGroup;
cellGroup = createRadioCellGroup(
null,
columnGroup,
0,
y,
col,
row,
colWidth,
cellWidth,
cellHeight,
padding,
textAlign,
textBaseline,
table,
cellTheme,
define as RadioColumnDefine,
range
);
}
} else if (type === 'switch') {
const createSwitchCellGroup = Factory.getFunction('createSwitchCellGroup') as CreateSwitchCellGroup;
cellGroup = createSwitchCellGroup(
Expand Down
Loading