Browse Source

fix:openZip-fileName

ananzhusen 1 month ago
parent
commit
424cd4ec57
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/views/components/Header.vue

+ 1 - 0
src/views/components/Header.vue

@@ -1018,6 +1018,7 @@ const openZip = async (file: File) => {
       continue;
     }
     if (key.endsWith('.json')) {
+      fileName = key.split('/')[0];
       // 认为只有一个 json 文件
       dataStr = await zip.file(key).async('string');
       break;