export-to-exceljs-util 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/defaultExport.js +6 -4
  2. package/package.json +1 -1
package/defaultExport.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import ExcelJS from "exceljs";
2
- import { ExcelExporter } from "./index";
3
2
  import { saveAs } from "file-saver";
4
3
  const fontStyle = {
5
4
  name: "Arial",
@@ -20,9 +19,12 @@ const borderStyle = {
20
19
  bottom: { style: "thin" },
21
20
  right: { style: "thin" },
22
21
  };
23
- export default class DefaultExport extends ExcelExporter {
24
- constructor() {
25
- super();
22
+ export default class DefaultExport {
23
+ constructor(columns, data, filename = "export.xlsx", describe) {
24
+ this.columns = columns;
25
+ this.data = data;
26
+ this.filename = filename;
27
+ this.describe = describe;
26
28
  }
27
29
  async export() {
28
30
  const workbook = new ExcelJS.Workbook();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "export-to-exceljs-util",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "使用exceljs导出excel文件",
5
5
  "main": "index.js",
6
6
  "scripts": {