-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] customMergeCell合并后内容显示不全 #1543
Labels
bug
Something isn't working
Comments
这里的合并规则写的有问题,规则需要应用到所有单元格
|
第二个问题,在getCellValue中会判断是否使用的自定义合并,会引起循环调用,getCellRawValue是获取原始数据,不会判断合并,所有不会引起循环调用;后续再getCellValue中加一个skipCustomMerge的参数,提供给合并函数里调用 |
Rui-Sun
added a commit
that referenced
this issue
Apr 22, 2024
21 tasks
Rui-Sun
added a commit
that referenced
this issue
Apr 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
0.23.3
Link to Minimal Reproduction
如下
Steps to Reproduce
`let tableInstance;
const generatePersons = count => {
return Array.from(new Array(count)).map((_, i) => ({
id: i + 1,
email1:
${i + 1}@xxx.com
,name:
name${i + 1}
,date1: '2022-9-1日',
tel: '000-0000-0000',
sex: i % 2 === 0 ? 'boy' : 'girl',
work: i % 2 === 0 ? 'back-end engineer' : 'front-end engineer',
city: 'beijing'
}));
};
const records = generatePersons(10);
const columns = [
{
field: 'id',
title: 'ID ff',
width: '1%',
minWidth: 200,
sort: true
},
{
field: 'email1',
title: 'email',
width: 200,
sort: true
},
{
title: 'full name',
columns: [
{
field: 'name',
title: 'First Name',
width: 200
},
{
field: 'name',
title: 'Last Name',
width: 200
}
]
},
{
field: 'date1',
title: 'birthday',
width: 200
},
{
field: 'sex',
title: 'sex',
width: 100
},
{
field: 'tel',
title: 'telephone',
width: 150
},
{
field: 'work',
title: 'job',
width: 200
},
{
field: 'city',
title: 'city',
width: 150
}
];
const option = {
records,
columns,
widthMode:'standard',
bottomFrozenRowCount:1,
customMergeCell: (col, row, table) => {
if (col ==0 && row % 2 == 0 && row > 3) {
return {
text: '总结栏:此数据为一份人员基本信息',
range: {
start: {
col: 0,
row: row - 1
},
end: {
col: 0,
row: row
}
},
style:{
borderLineWidth:[6,1,1,1],
borderColor:['gray']
}
};
}
}
};
tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID),option);
window['tableInstance'] = tableInstance;`
Current Behavior
合并后内容显示错误
Expected Behavior
期望合并后内容正常显示
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: