From f35678e14d7eb0c89bafdfe1ea0a35158db2eb9f Mon Sep 17 00:00:00 2001 From: wuduoyi Date: Wed, 10 Apr 2024 15:34:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20office-viewer=20excel=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AD=98=E5=9C=A8=E5=A4=9A=E4=B8=AA=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E6=97=B6=E6=B8=B2=E6=9F=93=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis/package.json | 2 +- packages/office-viewer/package.json | 2 +- packages/office-viewer/src/excel/sheet/getViewPointData.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/amis/package.json b/packages/amis/package.json index 75d7c3e41..596ed63f3 100644 --- a/packages/amis/package.json +++ b/packages/amis/package.json @@ -62,7 +62,7 @@ "moment": "^2.19.4", "moment-timezone": "^0.5.34", "mpegts.js": "^1.6.10", - "office-viewer": "^0.3.9", + "office-viewer": "^0.3.10", "prop-types": "^15.6.1", "qrcode.react": "^3.1.0", "react-cropper": "^2.1.8", diff --git a/packages/office-viewer/package.json b/packages/office-viewer/package.json index 56a323bf0..7a114b687 100644 --- a/packages/office-viewer/package.json +++ b/packages/office-viewer/package.json @@ -1,6 +1,6 @@ { "name": "office-viewer", - "version": "0.3.9", + "version": "0.3.10", "description": "office 文档在线预览", "main": "lib/index.js", "module": "esm/index.js", diff --git a/packages/office-viewer/src/excel/sheet/getViewPointData.ts b/packages/office-viewer/src/excel/sheet/getViewPointData.ts index e0e87a9a2..cd6f4bb8a 100644 --- a/packages/office-viewer/src/excel/sheet/getViewPointData.ts +++ b/packages/office-viewer/src/excel/sheet/getViewPointData.ts @@ -29,8 +29,9 @@ export function calcCellDisplaySize( let mergeCellId = ''; for (const mergeCell of mergeCells) { const {startRow, endRow, startCol, endCol} = mergeCell; - mergeCellId = `${startRow}-${endRow}-${startCol}-${endCol}`; + if (row >= startRow && row <= endRow && col >= startCol && col <= endCol) { + mergeCellId = `${startRow}-${endRow}-${startCol}-${endCol}`; isMergeCell = true; matchMergeCell = mergeCell; // 补上合并单元格的高宽