When I use the rowspan and colspan of the table attributes, the table's framework will be confusion,but my data framework is right , can author fix it? appreciate!!!
{
content: [
{
style: 'tableExample',
color: '#333',
table: {
headerRows: 1,
// keepWithHeaderRows: 1,
body: [
[
{text: '月份', rowSpan: 2},
{text: '驾驶人总数', rowSpan: 2},
{text: '违法次数', rowSpan: 2},
{text: '违法率', rowSpan: 2},
{text:'交通违法分类',colSpan:6},
'',
'',
'',
'',
'',
{text: '累计违法次数', rowSpan: 2},
{text: '当月已处理数', rowSpan: 2},
{text: '累计已处理数', rowSpan: 2},
{text: '备注', rowSpan: 2},
],
[
{},
{},
{},
{},
{text:'闯信号灯'},
{text:'闯信号灯'},
{text:'闯信号灯'},
{text:'闯信号灯'},
{text:'闯信号灯'},
{text:'闯信号灯'},
{},
{},
{},
{},
],
]
}
},
],
defaultStyle: {
font: 'Chinese',
},
styles: {
companyName: {
fontSize: 18,
bold: true,
},
tableName: {
marginTop: 10,
},
tableExample: {
marginTop: 10,
}
}
}

You have wrong docDefinition, header is on 2 rows, but is defined as 1 row (headerRows: 1). Change to headerRows: 2.
thank you very much
Most helpful comment
You have wrong docDefinition, header is on 2 rows, but is defined as 1 row (
headerRows: 1). Change toheaderRows: 2.