fix[excel]: default filename bug && format code (#857)

* fix filename bug

* format

* format
This commit is contained in:
花裤衩
2018-07-11 14:16:28 +08:00
committed by GitHub
parent 5fbf1cf5da
commit 77cb6b1f43
3 changed files with 321 additions and 274 deletions

View File

@@ -14,7 +14,9 @@ export function export_txt_to_zip(th, jsonData, txtName, zipName) {
txtData += `${tempStr}\r\n`
})
zip.file(`${txt_name}.txt`, txtData)
zip.generateAsync({type:"blob"}).then((blob) => {
zip.generateAsync({
type: "blob"
}).then((blob) => {
saveAs(blob, `${zip_name}.zip`)
}, (err) => {
alert('导出失败')