mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 12:38:11 +08:00
fix: 修改Excel导出 JS 脚本
This commit is contained in:
parent
f6b10b676d
commit
035ceabd1f
@ -24,6 +24,7 @@ define(function () {
|
|||||||
|
|
||||||
/*! 导出 Excel 文件 */
|
/*! 导出 Excel 文件 */
|
||||||
Excel.prototype.export = function (data, name, options) {
|
Excel.prototype.export = function (data, name, options) {
|
||||||
|
if (data === false || data === null) return this;
|
||||||
if (name.substring(0, -5).toLowerCase() !== '.xlsx') name += '.xlsx';
|
if (name.substring(0, -5).toLowerCase() !== '.xlsx') name += '.xlsx';
|
||||||
layui.excel.exportExcel(data, name, 'xlsx', options || this.options || {writeOpt: {bookSST: true}});
|
layui.excel.exportExcel(data, name, 'xlsx', options || this.options || {writeOpt: {bookSST: true}});
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user