:fix: insert the continue cell properly

This commit is contained in:
wangfengming
2020-07-08 12:32:01 +08:00
parent 0de302d192
commit 40dc90e585
3 changed files with 56 additions and 19 deletions

View File

@ -70,6 +70,9 @@ export class TableCell extends XmlComponent {
if (options.verticalMerge) {
this.properties.addVerticalMerge(options.verticalMerge);
} else if (options.rowSpan && options.rowSpan > 1) {
// if cell already have a `verticalMerge`, don't handle `rowSpan`
this.properties.addVerticalMerge(VerticalMergeType.RESTART);
}
if (options.margins) {
@ -84,10 +87,6 @@ export class TableCell extends XmlComponent {
this.properties.addGridSpan(options.columnSpan);
}
if (options.rowSpan && options.rowSpan > 1) {
this.properties.addVerticalMerge(VerticalMergeType.RESTART);
}
if (options.width) {
this.properties.setWidth(options.width.size, options.width.type);
}