@ticatec/batch-data-uploader 0.0.1 → 0.0.2

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.
@@ -28,7 +28,7 @@ export default abstract class BaseTemplate {
28
28
  * @param rows
29
29
  * @protected
30
30
  */
31
- protected consolidateData(rows: Array<any>): Array<any>;
31
+ protected consolidateData(rows: Array<any>): Promise<Array<any>>;
32
32
  /**
33
33
  * 解析一个excel文件
34
34
  * @param file
@@ -56,7 +56,7 @@ export default class BaseTemplate {
56
56
  * @param rows
57
57
  * @protected
58
58
  */
59
- consolidateData(rows) {
59
+ async consolidateData(rows) {
60
60
  return rows;
61
61
  }
62
62
  /**
@@ -81,7 +81,7 @@ export default class BaseTemplate {
81
81
  }
82
82
  rows.push({ data: rowObject, status: 'P' });
83
83
  }
84
- this._list = this.consolidateData(rows);
84
+ this._list = await this.consolidateData(rows);
85
85
  }
86
86
  /**
87
87
  * 上传数据
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticatec/batch-data-uploader",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "A reusable Svelte component for batch uploading Excel data with support for error handling, multi-language, and preprocessing.",
5
5
  "scripts": {
6
6
  "dev": "vite dev",