UNPKG

jnf-ui

Version:

基于 vue3+ ts+ Element-plus 二次封装组件

31 lines (30 loc) 865 B
import { CellStyle, ColInfo, Range, RowInfo } from "xlsx-js-style"; export type INSArr = (string | number)[]; export interface ITable { [key: string | number]: string | number; } export interface ICellStyle { [key: string]: CellStyle; } export interface ISheet { title?: string; titleStyle?: CellStyle; tHeaders?: INSArr[]; tHeaderStyle?: CellStyle; table: ITable[]; cols?: ColInfo[]; titleRow?: RowInfo; headerRows?: RowInfo[]; row?: RowInfo; merges?: Range[]; keys: INSArr; sheetName?: string; globalStyle?: CellStyle; cellStyle?: ICellStyle; } export interface IExcel { sheets: ISheet[]; fileName?: string; fileExtention?: "xls" | "xlsx"; } export declare const exportExcel: (excelData: IExcel, path?: string, success?: () => void, fail?: ((err: unknown) => void) | undefined) => void;