|
@@ -806,8 +806,8 @@ const openZip = async (file: File) => {
|
|
|
}
|
|
|
const { default: JSZip } = await import('jszip');
|
|
|
const zip = new JSZip();
|
|
|
- await zip.loadAsync(file);
|
|
|
-
|
|
|
+ await zip.loadAsync(file,{base64:true});
|
|
|
+ let fileName = file.name.slice(0, -4)
|
|
|
let dataStr = '';
|
|
|
for (const key in zip.files) {
|
|
|
if (zip.files[key].dir) {
|
|
@@ -857,6 +857,9 @@ const openZip = async (file: File) => {
|
|
|
);
|
|
|
let arr = key.split('/');
|
|
|
arr.shift();
|
|
|
+ if(arr[0]===fileName){
|
|
|
+ arr.shift();
|
|
|
+ }
|
|
|
let _key ='/'+ arr.join('/');
|
|
|
// if (_png) {
|
|
|
// _key = key.substring(_png);
|