This commit is contained in:
xuliangzhan
2020-10-10 18:22:24 +08:00
parent 789f7e8456
commit be2818154f
3 changed files with 11 additions and 11 deletions

View File

@@ -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)

View File

@@ -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)
})

View File

@@ -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": {