Browse Source

fix: Update file is correct now

Mr. Robot 4 months ago
parent
commit
4d1967e1af
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/views/FileManagement/index.vue

+ 1 - 1
src/views/FileManagement/index.vue

@@ -273,7 +273,7 @@ const submitData = async (data: DataItem) => {
     });
     });
     return false;
     return false;
   }
   }
-  if (data.file.length==0 && !!!form.value.id) {
+  if (data.file !== undefined && data.file.length == 0 && !!!form.value.id) {
     ElMessage({
     ElMessage({
       message: `请选择要上传的文件`,
       message: `请选择要上传的文件`,
       type: "error",
       type: "error",