Ver código fonte

三个场景上传文件优化

zhangliang2 3 anos atrás
pai
commit
56a0888d34
1 arquivos alterados com 6 adições e 4 exclusões
  1. 6 4
      src/views/sceneLibrary/components/fileDialog.vue

+ 6 - 4
src/views/sceneLibrary/components/fileDialog.vue

@@ -84,17 +84,19 @@ export default {
                         type
                 );
 
-                if (!item) {
+                if (type === "xml" && !item) {
                     item = this.attachmentList.find(
                         (i) =>
                             i.fileName.slice(
                                 i.fileName.lastIndexOf(".") + 1
                             ) === "xosc"
                     );
-                    if (!item) {
-                        item = {};
-                    }
                 }
+
+                if (!item) {
+                    item = {};
+                }
+
                 data[type + "Address"] = item.fileName || "";
             }
         },