mirror of
https://gitee.com/x-extends/vxe-table-plugin-export-xlsx.git
synced 2026-01-21 05:21:33 +08:00
fix
This commit is contained in:
4
index.ts
4
index.ts
@@ -226,8 +226,8 @@ function importXLSX (params: InterceptorImportParams) {
|
||||
})
|
||||
const workbook = XLSX.read(e.target.result, { type: 'binary' })
|
||||
const rest = XLSX.utils.sheet_to_json(XEUtils.first(workbook.Sheets))
|
||||
const fields = XEUtils.keys(rest.slice(0, 1)[0])
|
||||
const list = rest.slice(1)
|
||||
const fields = rest ? XEUtils.keys(rest[0]) : []
|
||||
const list = rest
|
||||
const status = checkImportData(tableFields, fields)
|
||||
if (status) {
|
||||
const records: any[] = list.map(item => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vxe-table-plugin-export-xlsx",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.5",
|
||||
"description": "基于 vxe-table 的表格插件,支持导出 xlsx 格式",
|
||||
"scripts": {
|
||||
"lib": "gulp build"
|
||||
|
||||
Reference in New Issue
Block a user