From be2818154f6c359cd9fdee9b7f192afb9d44cdde Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Sat, 10 Oct 2020 18:22:24 +0800 Subject: [PATCH] update --- depend.ts | 2 +- index.ts | 8 ++++---- package.json | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/depend.ts b/depend.ts index 6bf0bea..c38e278 100644 --- a/depend.ts +++ b/depend.ts @@ -1,4 +1,4 @@ -import XEUtils from 'xe-utils/methods/xe-utils' +import XEUtils from 'xe-utils/ctor' import dependencies from 'vxe-table/lib/utils/dependencies' XEUtils.mixin(dependencies) diff --git a/index.ts b/index.ts index f179105..5057573 100644 --- a/index.ts +++ b/index.ts @@ -57,7 +57,7 @@ declare module 'vxe-table/lib/vxe-table' { } } -function getValidColumn(column: ColumnConfig): ColumnConfig { +function getValidColumn (column: ColumnConfig): ColumnConfig { const { childNodes } = column const isColGroup = childNodes && childNodes.length if (isColGroup) { @@ -76,8 +76,8 @@ function exportXLSX (params: InterceptorExportParams) { const mergeCells = $table.getMergeCells() const colList: any[] = [] const footList: any[] = [] - const sheetCols: any[] = [] - const sheetMerges: any[] = [] + const sheetCols: { wpx: number }[] = [] + const sheetMerges: { s: { r: number, c: number }, e: { r: number, c: number } }[] = [] // 处理表头 if (isHeader) { const colHead: any = {} @@ -142,7 +142,7 @@ function exportXLSX (params: InterceptorExportParams) { const { footerData } = $table.getTableData() const footers = getFooterData(options, footerData) footers.forEach((rows) => { - const item: { [key: string]: any } = {} + const item: any = {} columns.forEach((column) => { item[column.id] = getFooterCellValue($table, options, rows, column) }) diff --git a/package.json b/package.json index dd38bfe..6063eab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table-plugin-export-xlsx", - "version": "2.0.0-beta.0", + "version": "2.0.0", "description": "基于 vxe-table 的表格插件,支持导出 xlsx 格式", "scripts": { "lib": "gulp build" @@ -47,13 +47,13 @@ "markdown-doctest": "^0.9.1", "prettier": "^1.18.2", "typescript": "^3.9.3", - "vue": "^2.6.11", - "vxe-table": "^3.0.0-beta.4", - "xe-utils": "^2.7.12", - "xlsx": "^0.16.6" + "vue": "^2.6.12", + "vxe-table": "^3.0.0-beta.5", + "xe-utils": "^3.0.0-beta.14", + "xlsx": "^0.16.7" }, "peerDependencies": { - "vxe-table": ">= 3.0.0", + "vxe-table": ">= 2.9.0 < 4", "xlsx": ">= 0.16.0" }, "repository": {