Parcourir la source

feat:工程下载3d文件名处理

ananzhusen il y a 1 mois
Parent
commit
690fbb51f2
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      src/services/project.ts

+ 6 - 0
src/services/project.ts

@@ -849,6 +849,12 @@ export const doDownloadProject = async () => {
         key,
         map[downloadType]
       );
+      let folderName =downloadType===Frame.vue3?'meta2d-vue3':downloadType===Frame.vue2?'meta2d-vue2': 'meta2d-react';
+      source3dList.forEach((item) => {
+        if(item.path.startsWith('/vue3/')||item.path.startsWith('/vue2/')||item.path.startsWith('/react/')){
+          item.path = item.path.replace('vue3',folderName).replace('vue2',folderName).replace('react',folderName);
+        }
+      });
       dList.push(...source3dList);
     }