Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
4ba784b1
Commit
4ba784b1
authored
Mar 08, 2020
by
Junling Bu
Browse files
perf[litemall-admin]: 删除不必要代码
parent
7a34bbe6
Changes
3
Hide whitespace changes
Inline
Side-by-side
litemall-admin/build/
build
.js
→
litemall-admin/build/
index
.js
View file @
4ba784b1
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
'
)
...
...
litemall-admin/package.json
View file @
4ba784b1
...
...
@@ -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"
,
...
...
litemall-admin/src/vendor/Export2Zip.js
deleted
100644 → 0
View file @
7a34bbe6
/* 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
(
'
导出失败
'
)
})
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment