[Bug] 自定义单元格合并,合并checkbox、radio列,合并后只出现自定义合并中配置的text文字,没有渲染checkbox、radio
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 486
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 16
Description
Version
1.7.4 后的版本
Link to Minimal Reproduction
无
Steps to Reproduce
const records = [
{ productName: 'aaaa', price: 20, check: { text: 'unchecked', checked: false, disable: false } },
{ productName: 'bbbb', price: 18, check: { text: 'checked', checked: true, disable: false } },
{ productName: 'cccc', price: 16, check: { text: 'disable', checked: true, disable: true } },
{ productName: 'cccc', price: 14, check: { text: 'disable', checked: false, disable: true } },
{ productName: 'eeee', price: 12, check: { text: 'checked', checked: false, disable: false } },
{ productName: 'ffff', price: 10, check: { text: 'checked', checked: false, disable: false } },
{ productName: 'gggg', price: 10, check: { text: 'checked', checked: false, disable: false } }
];
const columns = [
{
field: 'isCheck',
title: '',
width: 60,
headerType: 'checkbox',
cellType: 'checkbox'
},
{
field: 'productName',
title: 'productName',
width: 120
},
{
field: 'price',
title: 'checkbox',
width: 120,
cellType: 'checkbox',
disable: true,
checked: true
},
{
field: 'check',
title: 'checkbox',
width: 120,
cellType: 'checkbox'
// disable: true
}
];
const option = {
records,
columns,
customMergeCell: (col, row, table) => {
if (col ===0 && row >= 1 && row <= 2) {
return {
text: '合并',
range: {
start: {
col: 0,
row: 1
},
end: {
col: 0,
row:2
}
},
style: {
bgColor: 'red'
}
};
}
}
};
const tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID), option);
window['tableInstance'] = tableInstance;
Current Behavior
合并后只出现自定义合并中配置的text文字,没有渲染checkbox、radio
Expected Behavior
checkbox和radio列自定义合并后可以正常展示checkbox和radio
Environment
- OS:Windows11
- Browser:chrome 版本 138.0.7204.185(正式版本) (64 位)
- Framework: vue3
Any additional comments?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the customMergeCell example and trace the rendering path for merged cells with checkbox or radio columns. Reproduce the provided VTable.ListTable configuration, then verify that merged checkbox and radio cells render their controls rather than only the configured text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100