Bladeren bron

图片格式限制问题

Shannon_mu 3 jaren geleden
bovenliggende
commit
73bebe0bc6
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 3 3
      operationSupport/src/views/communityManagement/pageJump/AddOrEdit.vue

+ 3 - 3
operationSupport/src/views/communityManagement/pageJump/AddOrEdit.vue

@@ -122,7 +122,7 @@ export default {
             default: true
         }
     },
-    name:"communityManagementAddOrEdit",
+    name: 'communityManagementAddOrEdit',
     data() {
         return {
             regionId: '',
@@ -244,7 +244,7 @@ export default {
             }
         },
         beforeAvatarUpload(file) {
-            const isJPG = file.type === 'image/jpeg';
+            // const isJPG = file.type === 'image/jpeg';
             const isLt2M = file.size / 1024 / 1024 < 2;
 
             // if (!isJPG) {
@@ -253,7 +253,7 @@ export default {
             if (!isLt2M) {
                 this.$message.error('上传头像图片大小不能超过 2MB!');
             }
-            return isJPG && isLt2M;
+            return  isLt2M;
         },
         addressQueryClick() {
             this.mapPopUpStatus = true;