reactor:refine code&&demo

This commit is contained in:
Pan
2017-11-02 17:58:35 +08:00
parent ac5d087ea4
commit bb1d939a94
18 changed files with 138 additions and 139 deletions

View File

@@ -155,6 +155,6 @@ export function export_json_to_excel(th, jsonData, defaultTitle) {
wb.Sheets[ws_name] = ws;
var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
var title = defaultTitle || '列表'
var title = defaultTitle || 'excel-list'
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), title + ".xlsx")
}

View File

@@ -4,8 +4,8 @@ import JSZip from 'jszip'
export function export_txt_to_zip(th, jsonData, txtName, zipName) {
const zip = new JSZip()
const txt_name = txtName || '文本'
const zip_name = zipName || '压缩包'
const txt_name = txtName || 'file'
const zip_name = zipName || 'file'
const data = jsonData
let txtData = `${th}\r\n`
data.forEach((row) => {