excel-worker
v1.0.40
Published
基于excelJs、webwoker实现大数据量前端下载
Downloads
56
Readme
记录 vue3、exceljs、webworker 大数据前端下载
import { useWorderExcel } from 'excel-worker';
const { init: initWorderExcel, excelWorkerDownload } = useWorderExcel;
// 初始化数据
obj: {
name: '', // string 下载表名,
size: 10000, // 默认10000分割下载数据
}
initWorderExcel({obj});
// 下载方法
colums: [
{
title: '标题', // 表列名
key: 'title', // 表key,与data数据对应
width: 20, // 表格宽度, 默认50
}
]
data: [
{
title: '标题1',
}
]
excelWorkerDownload(data, columse)