Explorar o código

chore: 修复前端导出多级表头合并单元格抛出undefined的bug

喵你个旺呀 hai 1 ano
pai
achega
8df579df32
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Web/src/utils/exportExcel.ts

+ 1 - 1
Web/src/utils/exportExcel.ts

@@ -69,7 +69,7 @@ export function exportExcel(jsonarr: Array<EmptyObjectType>, name: string, heade
 	for (let i = 0; i < headerArr.length; i++) {
 		let row = headerArr[i];
 		for (let j = 0; j < row.length; j++) {
-			if (headerArr[i][j] == null) {
+			if (headerArr[i][j] == null && i > 0) {
 				headerArr[i][j] = headerArr[i - 1][j];
 			}
 		}