1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-09-10 12:50:38 +08:00

fix filename bug

This commit is contained in:
Pan 2018-07-11 14:12:47 +08:00
parent 5fbf1cf5da
commit bcd6d5441a

View File

@ -116,8 +116,9 @@ export function export_table_to_excel(id) {
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx")
}
export function export_json_to_excel({header, data, filename='excel-list', autoWidth=true}={}) {
export function export_json_to_excel({header, data, filename, autoWidth=true}={}) {
/* original data */
filename=filename||'excel-list'
data=[...data]
data.unshift(header);
var ws_name = "SheetJS";