fix: office-viewer excel 修复存在多个合并单元格时渲染丢失问题

This commit is contained in:
wuduoyi 2024-04-10 15:34:45 +08:00
parent 1e79106105
commit f35678e14d
3 changed files with 4 additions and 3 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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;
// 补上合并单元格的高宽