feat: table element can be merged after paging #41

This commit is contained in:
Hufe
2024-03-15 21:02:30 +08:00
committed by GitHub
parent 0523fc257a
commit 33a2dd8faa
3 changed files with 64 additions and 7 deletions
+17
View File
@@ -488,6 +488,23 @@ export function zipElementList(payload: IElement[]): IElement[] {
listElement.valueList = zipElementList(valueList)
element = listElement
} else if (element.type === ElementType.TABLE) {
// 分页表格先进行合并
if (element.pagingId) {
let tableIndex = e + 1
let combineCount = 0
while (tableIndex < elementList.length) {
const nextElement = elementList[tableIndex]
if (nextElement.pagingId === element.pagingId) {
element.height! += nextElement.height!
element.trList!.push(...nextElement.trList!)
tableIndex++
combineCount++
} else {
break
}
}
e += combineCount
}
if (element.trList) {
for (let t = 0; t < element.trList.length; t++) {
const tr = element.trList[t]