THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

perf: optimize import file-saver way(#2347)

pull/2625/head
Serge 花裤衩 4 months ago
parent
commit
3a08b6e471
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      src/vendor/Export2Excel.js
  2. +1
    -1
      src/vendor/Export2Zip.js

+ 3
- 3
src/vendor/Export2Excel.js View File

@@ -1,5 +1,5 @@
/* eslint-disable */
require('script-loader!file-saver');
import { saveAs } from 'file-saver'
import XLSX from 'xlsx'

function generateArray(table) {
@@ -151,14 +151,14 @@ export function export_json_to_excel({
filename,
merges = [],
autoWidth = true,
bookType= 'xlsx'
bookType = 'xlsx'
} = {}) {
/* original data */
filename = filename || 'excel-list'
data = [...data]
data.unshift(header);

for (let i = multiHeader.length-1; i > -1; i--) {
for (let i = multiHeader.length - 1; i > -1; i--) {
data.unshift(multiHeader[i])
}



+ 1
- 1
src/vendor/Export2Zip.js View File

@@ -1,5 +1,5 @@
/* eslint-disable */
require('script-loader!file-saver');
import { saveAs } from 'file-saver'
import JSZip from 'jszip'

export function export_txt_to_zip(th, jsonData, txtName, zipName) {


Loading…
Cancel
Save