Browse Source

perf[litemall-admin]: 删除不必要代码

Junling Bu 5 years ago
parent
commit
4ba784b1e5

+ 1 - 2
litemall-admin/build/build.js

@@ -1,6 +1,5 @@
 const { run } = require('runjs')
 const chalk = require('chalk')
-const config = require('../vue.config.js')
 const rawArgv = process.argv.slice(2)
 const args = rawArgv.join(' ')
 
@@ -10,7 +9,7 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
   run(`vue-cli-service build ${args}`)
 
   const port = 9526
-  const publicPath = config.publicPath
+  const publicPath = '/'
 
   var connect = require('connect')
   var serveStatic = require('serve-static')

+ 0 - 1
litemall-admin/package.json

@@ -53,7 +53,6 @@
     "element-ui": "2.12.0",
     "file-saver": "1.3.8",
     "js-cookie": "2.2.0",
-    "jszip": "3.2.1",
     "normalize.css": "7.0.0",
     "nprogress": "0.2.0",
     "path-to-regexp": "2.4.0",

+ 0 - 24
litemall-admin/src/vendor/Export2Zip.js

@@ -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('导出失败')
-  })
-}