wangfei 6 anni fa
parent
commit
1cf96dd632

+ 2
- 2
src/views/activity/edit.vue Vedi File

@@ -104,8 +104,8 @@ export default {
104 104
       'uploadImg'
105 105
     ]),
106 106
     beforeImgUpload (file) {
107
-      if (file.type !== 'image/jpeg') {
108
-        this.$message.error('上传图片只能是 JPG 格式!')
107
+      if (file.type !== 'image/jpeg' && file.type !== 'image/png') {
108
+        this.$message.error('上传图片只能是 JPG 或 PNG 格式!')
109 109
         return false
110 110
       }
111 111
       // if (file.size / 1024 > 300) {

+ 2
- 2
src/views/building/edit.vue Vedi File

@@ -285,8 +285,8 @@ export default {
285 285
       }
286 286
     },
287 287
     beforeImgUpload (file) {
288
-      if (file.type !== 'image/jpeg') {
289
-        this.$message.error('上传图片只能是 JPG 格式!')
288
+      if (file.type !== 'image/jpeg' && file.type !== 'image/png') {
289
+        this.$message.error('上传图片只能是 JPG 或 PNG 格式!')
290 290
         return false
291 291
       }
292 292
       // if (file.size / 1024 > 300) {

+ 2
- 2
src/views/dynamic/edit.vue Vedi File

@@ -75,8 +75,8 @@ export default {
75 75
       'editDynamics'
76 76
     ]),
77 77
     beforeImgUpload (file) {
78
-      if (file.type !== 'image/jpeg') {
79
-        this.$message.error('上传图片只能是 JPG 格式!')
78
+      if (file.type !== 'image/jpeg' && file.type !== 'image/png') {
79
+        this.$message.error('上传图片只能是 JPG 或 PNG 格式!')
80 80
         return false
81 81
       }
82 82
       // if (file.size / 1024 > 300) {