Skip to content

Commit

Permalink
fix: excel预览过大文件bug
Browse files Browse the repository at this point in the history
  • Loading branch information
501351981 committed Aug 29, 2023
1 parent 8da175a commit 575e338
Show file tree
Hide file tree
Showing 17 changed files with 331 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/packages/js-excel/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@js-preview/excel",
"type" :"module",
"version": "1.4.3",
"version": "1.4.4",
"description": "",
"main": "lib/index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion core/packages/vue-excel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-office/excel",
"version": "1.4.3",
"version": "1.4.4",
"description": "",
"main": "lib/index.js",
"files": [
Expand Down
6 changes: 4 additions & 2 deletions core/packages/vue-excel/src/excel.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,12 @@ export function transferExcelToSpreadSheet(workbook, options){
if(sheetData._media){
sheetData.media = sheetData._media;
}
sheetData.rows.len = Math.max(Math.max(...Object.keys(sheetData.rows)) + 1, 100);

let tempRowsKeys = Object.keys(sheetData.rows);
sheetData.rows.len = Math.max(tempRowsKeys[tempRowsKeys.length-1] + 1, 100);
workbookData.push(sheetData);
});
//console.log(workbookData, 'workbookData');
// console.log(workbookData, 'workbookData');
workbook._worksheets = sheets;
return {
workbookData,
Expand Down
Binary file modified core/public/static/wxqrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/dist/assets/DocxDemo-b1f7e1d4.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/dist/assets/ExcelDemo-2a829f65.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/dist/assets/JsDocxDemo-9c3a8a1a.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/dist/assets/JsExcelDemo-a5cf0ef3.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/dist/assets/JsPdfDemo-c32e8c5d.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions examples/dist/assets/PdfDemo-9bcb4f4f.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions examples/dist/assets/PreviewWrapper-5e9303df.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 575e338

Please sign in to comment.