@bsg-export/vue 1.0.6
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/dist/ExportButton.vue.d.ts +55 -0
- package/dist/ExportButton.vue.d.ts.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/use-exporter.d.ts +104 -0
- package/dist/use-exporter.d.ts.map +1 -0
- package/dist/use-exporter.js +147 -0
- package/package.json +48 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExportButton - 开箱即用的导出按钮组件
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```vue
|
|
6
|
+
* <ExportButton table-id="my-table" filename="报表.xlsx" :format="ExportFormat.Xlsx">
|
|
7
|
+
* 导出 Excel
|
|
8
|
+
* </ExportButton>
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
import type { ExportFormat } from '@bsg-export/types';
|
|
12
|
+
/** 组件 Props */
|
|
13
|
+
export interface ExportButtonProps {
|
|
14
|
+
/** 要导出的 HTML 表格元素的 ID */
|
|
15
|
+
tableId: string;
|
|
16
|
+
/** 导出文件名 */
|
|
17
|
+
filename?: string;
|
|
18
|
+
/** 导出格式 */
|
|
19
|
+
format?: ExportFormat;
|
|
20
|
+
/** 是否排除隐藏行/列 */
|
|
21
|
+
excludeHidden?: boolean;
|
|
22
|
+
/** 是否添加 UTF-8 BOM(仅 CSV 有效) */
|
|
23
|
+
withBom?: boolean;
|
|
24
|
+
/** 是否禁用按钮 */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** 初始化中的提示文本 */
|
|
27
|
+
initializingText?: string;
|
|
28
|
+
/** 导出中的提示文本(支持 {progress} 占位符) */
|
|
29
|
+
loadingText?: string;
|
|
30
|
+
}
|
|
31
|
+
declare var __VLS_1: {};
|
|
32
|
+
type __VLS_Slots = {} & {
|
|
33
|
+
default?: (props: typeof __VLS_1) => any;
|
|
34
|
+
};
|
|
35
|
+
declare const __VLS_component: import("vue").DefineComponent<ExportButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
+
success: () => any;
|
|
37
|
+
error: (error: Error) => any;
|
|
38
|
+
progress: (progress: number) => any;
|
|
39
|
+
}, string, import("vue").PublicProps, Readonly<ExportButtonProps> & Readonly<{
|
|
40
|
+
onSuccess?: (() => any) | undefined;
|
|
41
|
+
onError?: ((error: Error) => any) | undefined;
|
|
42
|
+
onProgress?: ((progress: number) => any) | undefined;
|
|
43
|
+
}>, {
|
|
44
|
+
disabled: boolean;
|
|
45
|
+
initializingText: string;
|
|
46
|
+
loadingText: string;
|
|
47
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
49
|
+
export default _default;
|
|
50
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=ExportButton.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportButton.vue.d.ts","sourceRoot":"","sources":["../src/ExportButton.vue"],"names":[],"mappings":"AA4FA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAe;AACf,MAAM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW;IACX,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,gBAAgB;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AA4ED,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAwB/C,QAAA,MAAM,eAAe;;;;;;;;;cA3GR,OAAO;sBAEC,MAAM;iBAEX,MAAM;6EA+GpB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @bsg-export/vue - belobog-stellar-grid 的 Vue 3 官方封装
|
|
3
|
+
*
|
|
4
|
+
* 提供 Composable 和组件,简化在 Vue 项目中使用表格导出功能。
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
export { useExporter } from './use-exporter';
|
|
9
|
+
export type { ExportTableOptions, ExportTablesXlsxOptions, ExportCsvBatchOptions, ExportXlsxBatchOptions, ExportTablesBatchOptions, } from './use-exporter';
|
|
10
|
+
export { default as ExportButton } from './ExportButton.vue';
|
|
11
|
+
export type { Column, MergeCellValue, CellValue, MergeableCellValue, DataRow, ExportDataOptions, SheetConfig, BatchSheetConfig, ProgressCallback, } from '@bsg-export/types';
|
|
12
|
+
export { ExportFormat } from '@bsg-export/types';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EACV,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAG7D,YAAY,EACV,MAAM,EACN,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,OAAO,EACP,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useExporter - WASM 导出管理 Composable
|
|
3
|
+
*
|
|
4
|
+
* 自动管理 WASM 初始化生命周期,提供类型安全的导出方法和响应式状态。
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```vue
|
|
8
|
+
* <script setup lang="ts">
|
|
9
|
+
* import { useExporter, ExportFormat } from '@bsg-export/vue';
|
|
10
|
+
*
|
|
11
|
+
* const { initialized, loading, progress, exportTable } = useExporter();
|
|
12
|
+
* </script>
|
|
13
|
+
*
|
|
14
|
+
* <template>
|
|
15
|
+
* <button @click="exportTable({ tableId: 'my-table', filename: '报表.xlsx', format: ExportFormat.Xlsx })"
|
|
16
|
+
* :disabled="!initialized || loading">
|
|
17
|
+
* {{ loading ? `导出中 ${progress}%` : '导出 Excel' }}
|
|
18
|
+
* </button>
|
|
19
|
+
* </template>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
import type { ExportFormat, ExportDataOptions, SheetConfig, BatchSheetConfig, DataRow } from '@bsg-export/types';
|
|
23
|
+
/** export_table 的参数配置 */
|
|
24
|
+
export interface ExportTableOptions {
|
|
25
|
+
/** 要导出的 HTML 表格元素的 ID */
|
|
26
|
+
tableId: string;
|
|
27
|
+
/** 导出文件名 */
|
|
28
|
+
filename?: string;
|
|
29
|
+
/** 导出格式 */
|
|
30
|
+
format?: ExportFormat;
|
|
31
|
+
/** 是否排除隐藏行/列 */
|
|
32
|
+
excludeHidden?: boolean;
|
|
33
|
+
/** 是否添加 UTF-8 BOM(仅 CSV 有效) */
|
|
34
|
+
withBom?: boolean;
|
|
35
|
+
/** 回调失败是否中断导出 */
|
|
36
|
+
strictProgressCallback?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/** 多工作表导出的参数配置 */
|
|
39
|
+
export interface ExportTablesXlsxOptions {
|
|
40
|
+
/** Sheet 配置数组 */
|
|
41
|
+
sheets: SheetConfig[];
|
|
42
|
+
/** 导出文件名 */
|
|
43
|
+
filename?: string;
|
|
44
|
+
}
|
|
45
|
+
/** 分批导出 CSV 的参数配置 */
|
|
46
|
+
export interface ExportCsvBatchOptions {
|
|
47
|
+
/** 要导出的 HTML 表格元素的 ID */
|
|
48
|
+
tableId: string;
|
|
49
|
+
/** 可选的独立 tbody ID */
|
|
50
|
+
tbodyId?: string;
|
|
51
|
+
/** 导出文件名 */
|
|
52
|
+
filename?: string;
|
|
53
|
+
/** 每批处理行数 */
|
|
54
|
+
batchSize?: number;
|
|
55
|
+
/** 是否排除隐藏行/列 */
|
|
56
|
+
excludeHidden?: boolean;
|
|
57
|
+
/** 是否添加 UTF-8 BOM */
|
|
58
|
+
withBom?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/** 分批导出 XLSX 的参数配置 */
|
|
61
|
+
export interface ExportXlsxBatchOptions {
|
|
62
|
+
/** 要导出的 HTML 表格元素的 ID */
|
|
63
|
+
tableId: string;
|
|
64
|
+
/** 可选的独立 tbody ID */
|
|
65
|
+
tbodyId?: string;
|
|
66
|
+
/** 导出文件名 */
|
|
67
|
+
filename?: string;
|
|
68
|
+
/** 每批处理行数 */
|
|
69
|
+
batchSize?: number;
|
|
70
|
+
/** 是否排除隐藏行/列 */
|
|
71
|
+
excludeHidden?: boolean;
|
|
72
|
+
}
|
|
73
|
+
/** 多工作表分批导出的参数配置 */
|
|
74
|
+
export interface ExportTablesBatchOptions {
|
|
75
|
+
/** Sheet 配置数组 */
|
|
76
|
+
sheets: BatchSheetConfig[];
|
|
77
|
+
/** 导出文件名 */
|
|
78
|
+
filename?: string;
|
|
79
|
+
/** 每批处理行数 */
|
|
80
|
+
batchSize?: number;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* WASM 导出管理 Composable
|
|
84
|
+
*
|
|
85
|
+
* 自动初始化 WASM 模块,提供类型安全的导出方法,
|
|
86
|
+
* 管理 loading / progress / error 响应式状态。
|
|
87
|
+
*/
|
|
88
|
+
export declare function useExporter(): {
|
|
89
|
+
/** WASM 是否已初始化完成 */
|
|
90
|
+
initialized: import("vue").Ref<boolean, boolean>;
|
|
91
|
+
/** 是否正在导出 */
|
|
92
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
93
|
+
/** 导出进度 (0-100) */
|
|
94
|
+
progress: import("vue").Ref<number, number>;
|
|
95
|
+
/** 错误信息 */
|
|
96
|
+
error: import("vue").Ref<Error | null, Error | null>;
|
|
97
|
+
exportTable: (options: ExportTableOptions) => void;
|
|
98
|
+
exportData: (data: DataRow[], options?: ExportDataOptions) => void;
|
|
99
|
+
exportTablesXlsx: (options: ExportTablesXlsxOptions) => void;
|
|
100
|
+
exportCsvBatch: (options: ExportCsvBatchOptions) => Promise<void>;
|
|
101
|
+
exportXlsxBatch: (options: ExportXlsxBatchOptions) => Promise<void>;
|
|
102
|
+
exportTablesBatch: (options: ExportTablesBatchOptions) => Promise<void>;
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=use-exporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-exporter.d.ts","sourceRoot":"","sources":["../src/use-exporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAEhB,OAAO,EACR,MAAM,mBAAmB,CAAC;AAE3B,yBAAyB;AACzB,MAAM,WAAW,kBAAkB;IACjC,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW;IACX,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,gBAAgB;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB;IACjB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,kBAAkB;AAClB,MAAM,WAAW,uBAAuB;IACtC,iBAAiB;IACjB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,YAAY;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAqB;AACrB,MAAM,WAAW,qBAAqB;IACpC,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,sBAAsB;AACtB,MAAM,WAAW,sBAAsB;IACrC,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,oBAAoB;AACpB,MAAM,WAAW,wBAAwB;IACvC,iBAAiB;IACjB,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,YAAY;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuBD;;;;;GAKG;AACH,wBAAgB,WAAW;IA2IvB,oBAAoB;;IAEpB,aAAa;;IAEb,mBAAmB;;IAEnB,WAAW;;2BAnFiB,kBAAkB;uBAetB,OAAO,EAAE,YAAY,iBAAiB;gCAU7B,uBAAuB;8BAWnB,qBAAqB;+BAepB,sBAAsB;iCAcpB,wBAAwB;EA2BnE"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { ref, onMounted, onUnmounted } from "vue";
|
|
2
|
+
let wasmModule = null;
|
|
3
|
+
let wasmInitPromise = null;
|
|
4
|
+
async function initWasm() {
|
|
5
|
+
if (wasmModule) return wasmModule;
|
|
6
|
+
if (!wasmInitPromise) {
|
|
7
|
+
wasmInitPromise = import("belobog-stellar-grid").then(async (mod) => {
|
|
8
|
+
await mod.default();
|
|
9
|
+
wasmModule = mod;
|
|
10
|
+
return mod;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return wasmInitPromise;
|
|
14
|
+
}
|
|
15
|
+
function useExporter() {
|
|
16
|
+
const initialized = ref(false);
|
|
17
|
+
const loading = ref(false);
|
|
18
|
+
const progress = ref(0);
|
|
19
|
+
const error = ref(null);
|
|
20
|
+
let mounted = true;
|
|
21
|
+
onMounted(() => {
|
|
22
|
+
mounted = true;
|
|
23
|
+
initWasm().then(() => {
|
|
24
|
+
if (mounted) initialized.value = true;
|
|
25
|
+
}).catch((err) => {
|
|
26
|
+
if (mounted) error.value = err instanceof Error ? err : new Error(String(err));
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
onUnmounted(() => {
|
|
30
|
+
mounted = false;
|
|
31
|
+
});
|
|
32
|
+
const createProgressCallback = () => {
|
|
33
|
+
return (p) => {
|
|
34
|
+
if (mounted) progress.value = p;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const wrapSync = (fn) => {
|
|
38
|
+
if (!initialized.value || !wasmModule) return;
|
|
39
|
+
loading.value = true;
|
|
40
|
+
progress.value = 0;
|
|
41
|
+
error.value = null;
|
|
42
|
+
try {
|
|
43
|
+
fn();
|
|
44
|
+
if (mounted) progress.value = 100;
|
|
45
|
+
} catch (err) {
|
|
46
|
+
if (mounted) error.value = err instanceof Error ? err : new Error(String(err));
|
|
47
|
+
} finally {
|
|
48
|
+
if (mounted) loading.value = false;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const wrapAsync = async (fn) => {
|
|
52
|
+
if (!initialized.value || !wasmModule) return;
|
|
53
|
+
loading.value = true;
|
|
54
|
+
progress.value = 0;
|
|
55
|
+
error.value = null;
|
|
56
|
+
try {
|
|
57
|
+
await fn();
|
|
58
|
+
if (mounted) progress.value = 100;
|
|
59
|
+
} catch (err) {
|
|
60
|
+
if (mounted) error.value = err instanceof Error ? err : new Error(String(err));
|
|
61
|
+
} finally {
|
|
62
|
+
if (mounted) loading.value = false;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const exportTable = (options) => {
|
|
66
|
+
wrapSync(() => {
|
|
67
|
+
wasmModule.export_table(
|
|
68
|
+
options.tableId,
|
|
69
|
+
options.filename,
|
|
70
|
+
options.format,
|
|
71
|
+
options.excludeHidden,
|
|
72
|
+
createProgressCallback(),
|
|
73
|
+
options.withBom,
|
|
74
|
+
options.strictProgressCallback
|
|
75
|
+
);
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
const exportData = (data, options) => {
|
|
79
|
+
wrapSync(() => {
|
|
80
|
+
const opts = options ? { ...options, progressCallback: options.progressCallback ?? createProgressCallback() } : { progressCallback: createProgressCallback() };
|
|
81
|
+
wasmModule.export_data(data, opts);
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
const exportTablesXlsx = (options) => {
|
|
85
|
+
wrapSync(() => {
|
|
86
|
+
wasmModule.export_tables_xlsx(
|
|
87
|
+
options.sheets,
|
|
88
|
+
options.filename,
|
|
89
|
+
createProgressCallback()
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
const exportCsvBatch = async (options) => {
|
|
94
|
+
await wrapAsync(async () => {
|
|
95
|
+
await wasmModule.export_table_to_csv_batch(
|
|
96
|
+
options.tableId,
|
|
97
|
+
options.tbodyId,
|
|
98
|
+
options.filename,
|
|
99
|
+
options.batchSize,
|
|
100
|
+
options.excludeHidden,
|
|
101
|
+
createProgressCallback(),
|
|
102
|
+
options.withBom
|
|
103
|
+
);
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
const exportXlsxBatch = async (options) => {
|
|
107
|
+
await wrapAsync(async () => {
|
|
108
|
+
await wasmModule.export_table_to_xlsx_batch(
|
|
109
|
+
options.tableId,
|
|
110
|
+
options.tbodyId,
|
|
111
|
+
options.filename,
|
|
112
|
+
options.batchSize,
|
|
113
|
+
options.excludeHidden,
|
|
114
|
+
createProgressCallback()
|
|
115
|
+
);
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
const exportTablesBatch = async (options) => {
|
|
119
|
+
await wrapAsync(async () => {
|
|
120
|
+
await wasmModule.export_tables_to_xlsx_batch(
|
|
121
|
+
options.sheets,
|
|
122
|
+
options.filename,
|
|
123
|
+
options.batchSize,
|
|
124
|
+
createProgressCallback()
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
return {
|
|
129
|
+
/** WASM 是否已初始化完成 */
|
|
130
|
+
initialized,
|
|
131
|
+
/** 是否正在导出 */
|
|
132
|
+
loading,
|
|
133
|
+
/** 导出进度 (0-100) */
|
|
134
|
+
progress,
|
|
135
|
+
/** 错误信息 */
|
|
136
|
+
error,
|
|
137
|
+
exportTable,
|
|
138
|
+
exportData,
|
|
139
|
+
exportTablesXlsx,
|
|
140
|
+
exportCsvBatch,
|
|
141
|
+
exportXlsxBatch,
|
|
142
|
+
exportTablesBatch
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
export {
|
|
146
|
+
useExporter
|
|
147
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bsg-export/vue",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "belobog-stellar-grid 的 Vue 3 官方封装组件",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "vue-tsc --declaration --emitDeclarationOnly --outDir dist && esbuild src/index.ts src/use-exporter.ts --outdir=dist --format=esm --bundle=false",
|
|
19
|
+
"typecheck": "vue-tsc --noEmit"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"belobog",
|
|
23
|
+
"stellar-grid",
|
|
24
|
+
"vue",
|
|
25
|
+
"export",
|
|
26
|
+
"table"
|
|
27
|
+
],
|
|
28
|
+
"author": "Kurisu <makise_kurisuu@outlook.jp>",
|
|
29
|
+
"license": "MIT OR Apache-2.0",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/kurisu994/belobog-stellar-grid",
|
|
33
|
+
"directory": "packages/vue"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"belobog-stellar-grid": ">=1.0.0",
|
|
37
|
+
"vue": ">=3.3.0"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@bsg-export/types": "file:../types"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"esbuild": "^0.25.0",
|
|
44
|
+
"typescript": "^5.7.0",
|
|
45
|
+
"vue": "^3.5.0",
|
|
46
|
+
"vue-tsc": "^2.2.0"
|
|
47
|
+
}
|
|
48
|
+
}
|