修改表格JS组件

This commit is contained in:
邹景立 2021-01-26 17:38:00 +08:00
parent 02158597d4
commit 42c9ecc7b5

View File

@ -1,9 +1,12 @@
define(function () {
function excel(data, filename) {
if (filename.substr(-5).toLowerCase() !== '.xlsx') filename += '.xlsx';
/*! 下载 Excel 文件 */
function excel(data, name) {
if (name.substr(-5).toLowerCase() !== '.xlsx') {
name += '.xlsx';
}
layui.use('excel', function () {
layui.excel.exportExcel(data, filename, 'xlsx')
layui.excel.exportExcel(data, name, 'xlsx')
});
}