vxe-table-plugin-export-xlsx-xhx 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,8 @@ function getCellLabel(column, cellValue) {
15
15
  if (cellValue) {
16
16
  switch (column.cellType) {
17
17
  case 'string':
18
- return _xeUtils["default"].toValueString(cellValue);
18
+ // return _xeUtils["default"].toValueString(cellValue);
19
+ return _xeUtils.toValueString(cellValue);
19
20
  case 'number':
20
21
  if (!isNaN(cellValue)) {
21
22
  return Number(cellValue);
@@ -31,7 +32,9 @@ function getCellLabel(column, cellValue) {
31
32
  return cellValue;
32
33
  }
33
34
  function getFooterCellValue($table, opts, rows, column) {
34
- var cellValue = _xeUtils["default"].toString(rows[$table.$getColumnIndex(column)]);
35
+ // var cellValue = _xeUtils["default"].toString(rows[$table.$getColumnIndex(column)]);
36
+ var cellValue = _xeUtils.toString(rows[$table.$getColumnIndex(column)]);
37
+
35
38
  return cellValue;
36
39
  }
37
40
  function toBuffer(wbout) {
@@ -60,7 +63,7 @@ function exportXLSX(params) {
60
63
  if (isHeader) {
61
64
  columns.forEach(function (column) {
62
65
  // colHead[column.id] = XEUtils.toString(original ? column.property : column.getTitle())
63
- colHead[column.id] = _xeUtils["default"].toString(original ? column.property : column.getTitle());
66
+ colHead[column.id] = _xeUtils.toString(original ? column.property : column.getTitle());
64
67
  });
65
68
  }
66
69
  // 新增部分
@@ -83,13 +86,13 @@ function exportXLSX(params) {
83
86
  footList.push(item);
84
87
  });
85
88
  }
86
- var book = _xlsx["default"].utils.book_new();
87
- var sheet = _xlsx["default"].utils.json_to_sheet((isHeader ? [colHead] : []).concat(rowList).concat(footList), {
89
+ var book = _xlsx.utils.book_new();
90
+ var sheet = _xlsx.utils.json_to_sheet((isHeader ? [colHead] : []).concat(rowList).concat(footList), {
88
91
  skipHeader: true
89
92
  });
90
93
  // 转换数据
91
- _xlsx["default"].utils.book_append_sheet(book, sheet, sheetName);
92
- var wbout = _xlsx["default"].write(book, {
94
+ _xlsx.utils.book_append_sheet(book, sheet, sheetName);
95
+ var wbout = _xlsx.write(book, {
93
96
  bookType: type,
94
97
  bookSST: false,
95
98
  type: 'binary'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vxe-table-plugin-export-xlsx-xhx",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "基于 vxe-table 表格的增强插件,支持导出 xlsx 格式",
5
5
  "scripts": {
6
6
  "lib": "gulp build"