|
@@ -1,16 +1,13 @@
|
|
|
import * as XLSX from "xlsx";
|
|
|
|
|
|
/**
|
|
|
- * @description:
|
|
|
- * @param {Object} json 服务端发过来的数据
|
|
|
- * @param {String} name 导出Excel文件名字
|
|
|
-
|
|
|
- * @param {Array} titleArr 导出Excel表头
|
|
|
-
|
|
|
- * @param {String} sheetName 导出sheetName名字
|
|
|
- * @return:
|
|
|
+ *
|
|
|
+ * @param json 数据源
|
|
|
+ * @param name 表名
|
|
|
+ * @param titleArr 列名集合
|
|
|
+ * @param sheetName 分页名
|
|
|
*/
|
|
|
-export const exportExcel = (json, name, titleArr, sheetName) => {
|
|
|
+export const exportExcel = (json, name, titleArr, sheetName = "") => {
|
|
|
/* convert state to workbook */
|
|
|
let data = new Array();
|
|
|
let keyArray = new Array();
|