From 5851e61cfcbb14fa199b507dc429917075659161 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Sat, 6 Apr 2024 10:58:20 +0800 Subject: [PATCH] fix: cannot page when merge cells across columns in the same row #41 --- src/editor/core/draw/Draw.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/editor/core/draw/Draw.ts b/src/editor/core/draw/Draw.ts index 1b63717..2a19cfd 100644 --- a/src/editor/core/draw/Draw.ts +++ b/src/editor/core/draw/Draw.ts @@ -1318,8 +1318,12 @@ export class Draw { curPagePreHeight + rowMarginHeight + preTrHeight + trHeight > height ) { - // 是否跨列 - if (element.colgroup?.length !== tr.tdList.length) { + // 当前行存在跨行中断-暂时忽略分页 + const rowColCount = tr.tdList.reduce( + (pre, cur) => pre + cur.colspan, + 0 + ) + if (element.colgroup?.length !== rowColCount) { deleteCount = 0 } break