|
@@ -60,7 +60,7 @@
|
|
|
action="/api-web/uploadFile"
|
|
|
:headers="headers"
|
|
|
:show-file-list="false"
|
|
|
- accept=".jpg, .jpeg, .png"
|
|
|
+ accept=".jpg, .jpeg, .png, .gif"
|
|
|
:on-success="handleAvatarSuccess"
|
|
|
:before-upload="beforeAvatarUpload">
|
|
|
<!-- 判断是图片还是视频 -->
|
|
@@ -109,7 +109,7 @@
|
|
|
:show-upload-list="false"
|
|
|
:headers="headers"
|
|
|
:on-success="handleSuccess"
|
|
|
- accept=".jpg, .jpeg, .png"
|
|
|
+ accept=".jpg, .jpeg, .png, .gif"
|
|
|
:max-size="2048"
|
|
|
multiple
|
|
|
action="/api-web/uploadFile">
|
|
@@ -142,7 +142,7 @@
|
|
|
:headers="headers"
|
|
|
:show-file-list="false"
|
|
|
v-loading="uploadImgLoading"
|
|
|
- accept=".jpg, .jpeg, .png"
|
|
|
+ accept=".jpg, .jpeg, .png, .gif"
|
|
|
:on-success="handleImgSuccess"
|
|
|
:on-error="handleUploadImgError"
|
|
|
:before-upload="beforeImgUpload">
|
|
@@ -688,7 +688,8 @@ export default {
|
|
|
beforeImgUpload (file) {
|
|
|
const imageType = {
|
|
|
"image/png": true,
|
|
|
- "image/jpeg": true
|
|
|
+ "image/jpeg": true,
|
|
|
+ "image/gif": true
|
|
|
};
|
|
|
const isImage = imageType[file.type];
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
@@ -710,7 +711,8 @@ export default {
|
|
|
beforeAvatarUpload (file) {
|
|
|
const imageType = {
|
|
|
"image/png": true,
|
|
|
- "image/jpeg": true
|
|
|
+ "image/jpeg": true,
|
|
|
+ "image/gif": true
|
|
|
};
|
|
|
const isImage = imageType[file.type];
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|