@sl-material/sl-table-sheet 1.3.0-beta0 → 1.4.1-beta0
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.
- package/core/SlTableSheet.d.ts +7 -4
- package/core/excel/ExcelExporter.d.ts +7 -0
- package/package.json +6 -6
- package/sl-table-sheet.cjs.js +80 -80
- package/sl-table-sheet.es.js +5578 -5671
- package/sl-table-sheet.umd.umd.js +76 -76
package/core/SlTableSheet.d.ts
CHANGED
|
@@ -4,6 +4,11 @@ import { Toolbar, ToolbarConfig } from './Toolbar';
|
|
|
4
4
|
import { SheetTabs } from './SheetTabs';
|
|
5
5
|
import { ExcelParseOptions, ExcelParseResult, MultiSheetParseResult, SheetData } from './excel';
|
|
6
6
|
|
|
7
|
+
interface ExcelExportOptions {
|
|
8
|
+
filterEmptyColumns?: boolean;
|
|
9
|
+
/** 导出所有已导入的工作表,并保留原工作表名称 */
|
|
10
|
+
allSheets?: boolean;
|
|
11
|
+
}
|
|
7
12
|
/** Loading 配置 */
|
|
8
13
|
export interface LoadingConfig {
|
|
9
14
|
/** 是否显示 loading,默认 true */
|
|
@@ -146,14 +151,12 @@ export declare class SlTableSheet {
|
|
|
146
151
|
* @param options 导出选项
|
|
147
152
|
* @returns Excel 文件的 ArrayBuffer
|
|
148
153
|
*/
|
|
149
|
-
exportToExcelStream(options?:
|
|
150
|
-
filterEmptyColumns?: boolean;
|
|
151
|
-
}): ArrayBuffer;
|
|
154
|
+
exportToExcelStream(options?: ExcelExportOptions): ArrayBuffer;
|
|
152
155
|
/**
|
|
153
156
|
* 下载 Excel 文件
|
|
154
157
|
* @param filename 文件名(不含扩展名)
|
|
155
158
|
*/
|
|
156
|
-
downloadExcel(filename?: string): void;
|
|
159
|
+
downloadExcel(filename?: string, options?: ExcelExportOptions): void;
|
|
157
160
|
/**
|
|
158
161
|
* 显示 loading 状态
|
|
159
162
|
* @param text loading 文本,不传则使用配置中的默认文本
|
|
@@ -7,6 +7,13 @@ export declare class ExcelExporter {
|
|
|
7
7
|
static exportToStream(columns: ExcelColumn[], records: any[], options?: {
|
|
8
8
|
filterEmptyColumns?: boolean;
|
|
9
9
|
}): ArrayBuffer;
|
|
10
|
+
static exportSheetsToStream(sheets: {
|
|
11
|
+
sheetName: string;
|
|
12
|
+
columns: ExcelColumn[];
|
|
13
|
+
records: any[];
|
|
14
|
+
}[], options?: {
|
|
15
|
+
filterEmptyColumns?: boolean;
|
|
16
|
+
}): ArrayBuffer;
|
|
10
17
|
/**
|
|
11
18
|
* 下载 Excel 文件
|
|
12
19
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sl-material/sl-table-sheet",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1-beta0",
|
|
4
4
|
"description": "VTable 组件库 - 支持 npm 和 UMD",
|
|
5
5
|
"main": "./sl-table-sheet.cjs.js",
|
|
6
6
|
"module": "./sl-table-sheet.es.js",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"author": "",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@visactor/vtable": "^1.
|
|
24
|
-
"@visactor/vtable-editors": "^1.
|
|
25
|
-
"@visactor/vtable-sheet": "^1.
|
|
26
|
-
"@visactor/vtable-
|
|
23
|
+
"@visactor/vtable": "^1.26.0",
|
|
24
|
+
"@visactor/vtable-editors": "^1.26.0",
|
|
25
|
+
"@visactor/vtable-sheet": "^1.26.0",
|
|
26
|
+
"@visactor/vtable-plugins": "^1.26.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependenciesMeta": {
|
|
29
29
|
"@visactor/vtable": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@visactor/vtable-sheet": {
|
|
36
36
|
"optional": false
|
|
37
37
|
},
|
|
38
|
-
"@visactor/vtable-
|
|
38
|
+
"@visactor/vtable-plugins": {
|
|
39
39
|
"optional": false
|
|
40
40
|
}
|
|
41
41
|
}
|