diff --git a/package.json b/package.json index 2aaaf6b3..6fdeb081 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "fuse.js": "3.4.2", "js-cookie": "2.2.0", "jsonlint": "1.6.3", - "jszip": "3.1.5", "localforage": "^1.7.3", "lodash": "^4.17.11", "lodash.debounce": "^4.0.8", diff --git a/src/vendor/Export2Zip.js b/src/vendor/Export2Zip.js deleted file mode 100644 index f776465e..00000000 --- a/src/vendor/Export2Zip.js +++ /dev/null @@ -1,24 +0,0 @@ -/* eslint-disable */ -require('script-loader!file-saver'); -import JSZip from 'jszip' - -export function export_txt_to_zip(th, jsonData, txtName, zipName) { - const zip = new JSZip() - const txt_name = txtName || 'file' - const zip_name = zipName || 'file' - const data = jsonData - let txtData = `${th}\r\n` - data.forEach((row) => { - let tempStr = '' - tempStr = row.toString() - txtData += `${tempStr}\r\n` - }) - zip.file(`${txt_name}.txt`, txtData) - zip.generateAsync({ - type: "blob" - }).then((blob) => { - saveAs(blob, `${zip_name}.zip`) - }, (err) => { - alert('导出失败') - }) -}