huangbin 4 years ago
parent
commit
aac44f956b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/common/setup/upload/index.ts

+ 2 - 2
src/common/setup/upload/index.ts

@@ -119,9 +119,9 @@ export function handlePreviewImg() {
         } else {
         } else {
             if (!file.url && !file.preview) {
             if (!file.url && !file.preview) {
                 file.preview = (await getBase64(file.originFileObj)) as string;
                 file.preview = (await getBase64(file.originFileObj)) as string;
-                previewImage.value = file.url || file.preview;
-                previewVisible.value = true;
             }
             }
+            previewImage.value = file.url || file.preview;
+            previewVisible.value = true;
         }
         }
     }
     }
     return { previewVisible, previewImage, cancelImg, previewImg, getImgName }
     return { previewVisible, previewImage, cancelImg, previewImg, getImgName }