1
0
mirror of synced 2025-12-12 16:28:04 +08:00
This commit is contained in:
xuliangzhan
2020-09-16 19:27:50 +08:00
parent f393569a6d
commit ab2ee50693
2 changed files with 3 additions and 2 deletions

View File

@@ -85,7 +85,8 @@ function exportXLSX (params: InterceptorExportParams) {
}
const exportMethod = () => {
const book = XLSX.utils.book_new()
const sheet = XLSX.utils.json_to_sheet((isHeader ? [colHead] : []).concat(rowList).concat(footList), { skipHeader: true })
const list = (isHeader ? [colHead] : []).concat(rowList).concat(footList)
const sheet = XLSX.utils.json_to_sheet(list.length ? list : [{}], { skipHeader: true })
// 设置列宽
sheet['!cols'] = sheetCols
// 转换数据

View File

@@ -1,6 +1,6 @@
{
"name": "vxe-table-plugin-export-xlsx",
"version": "1.6.2",
"version": "1.6.3",
"description": "基于 vxe-table 表格的增强插件,支持导出 xlsx 格式",
"scripts": {
"lib": "gulp build"