fix: excel报错

This commit is contained in:
liyulin 2023-02-14 16:57:15 +08:00
parent ff5c916b55
commit 1bf84cd227
8 changed files with 8 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vue-office/examples/dist/vite.svg" /> <link rel="icon" type="image/svg+xml" href="/vue-office/examples/dist/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue</title> <title>Vite + Vue</title>
<script type="module" crossorigin src="/vue-office/examples/dist/assets/index-9bc483bb.js"></script> <script type="module" crossorigin src="/vue-office/examples/dist/assets/index-387877b2.js"></script>
<link rel="stylesheet" href="/vue-office/examples/dist/assets/index-1db1ccb4.css"> <link rel="stylesheet" href="/vue-office/examples/dist/assets/index-1db1ccb4.css">
</head> </head>
<body> <body>

View File

@ -1,5 +1,5 @@
{ {
"$schema": "node_modules/lerna/schemas/lerna-schema.json", "$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true, "useWorkspaces": true,
"version": "0.1.2" "version": "0.1.3"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "vue-office", "name": "vue-office",
"version": "0.1.0", "version": "0.1.3",
"description": "通过Vue开发的办公文档预览组件支持docx、pdf、ppt、excel(已实现)的预览", "description": "通过Vue开发的办公文档预览组件支持docx、pdf、ppt、excel(已实现)的预览",
"scripts": {}, "scripts": {},
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue-office/docx", "name": "@vue-office/docx",
"version": "0.1.2", "version": "0.1.3",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"files": [ "files": [

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue-office/excel", "name": "@vue-office/excel",
"version": "0.1.2", "version": "0.1.3",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"files": [ "files": [

View File

@ -44,7 +44,7 @@ export default defineComponent({
mergeAddressData.push(mergeAddress) mergeAddressData.push(mergeAddress)
} }
sheetData.cols = {} sheetData.cols = {}
for(let i = 0;i < sheet.columns.length; i++) for(let i = 0;i < (sheet.columns || []).length; i++)
{ {
sheetData.cols[i.toString()] = {} sheetData.cols[i.toString()] = {}
if(sheet.columns[i].width) { if(sheet.columns[i].width) {

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue-office/pdf", "name": "@vue-office/pdf",
"version": "0.1.2", "version": "0.1.3",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"files": [ "files": [