mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改表格JS组件
This commit is contained in:
parent
02158597d4
commit
42c9ecc7b5
@ -1,9 +1,12 @@
|
|||||||
define(function () {
|
define(function () {
|
||||||
|
|
||||||
function excel(data, filename) {
|
/*! 下载 Excel 文件 */
|
||||||
if (filename.substr(-5).toLowerCase() !== '.xlsx') filename += '.xlsx';
|
function excel(data, name) {
|
||||||
|
if (name.substr(-5).toLowerCase() !== '.xlsx') {
|
||||||
|
name += '.xlsx';
|
||||||
|
}
|
||||||
layui.use('excel', function () {
|
layui.use('excel', function () {
|
||||||
layui.excel.exportExcel(data, filename, 'xlsx')
|
layui.excel.exportExcel(data, name, 'xlsx')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user