|
|
|
|
@ -281,6 +281,7 @@
|
|
|
|
|
:on-remove="bannerUploadRemove"
|
|
|
|
|
:on-success="bannerUploadSuccess"
|
|
|
|
|
:on-error="uploadError"
|
|
|
|
|
:before-upload="handleBeforeUploadImage"
|
|
|
|
|
>
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
<div slot="file" slot-scope="{ file }">
|
|
|
|
|
@ -328,6 +329,7 @@
|
|
|
|
|
:on-remove="logoUploadRemove"
|
|
|
|
|
:on-success="logoUploadSuccess"
|
|
|
|
|
:on-error="uploadError"
|
|
|
|
|
:before-upload="handleBeforeUploadImage"
|
|
|
|
|
>
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
<div slot="file" slot-scope="{ file }">
|
|
|
|
|
@ -375,6 +377,7 @@
|
|
|
|
|
:on-remove="serialUploadRemove"
|
|
|
|
|
:on-success="serialUploadSuccess"
|
|
|
|
|
:on-error="uploadError"
|
|
|
|
|
:before-upload="handleBeforeUploadImage"
|
|
|
|
|
>
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
<div slot="file" slot-scope="{ file }">
|
|
|
|
|
@ -2547,6 +2550,17 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
handleBeforeUploadImage(file) {
|
|
|
|
|
let fileType = ["jpg", "png", "JPG", "PNG"]
|
|
|
|
|
const fileName = file.name.split('.');
|
|
|
|
|
const fileExt = fileName[fileName.length - 1];
|
|
|
|
|
const isTypeOk = fileType.indexOf(fileExt) >= 0;
|
|
|
|
|
if (!isTypeOk) {
|
|
|
|
|
this.$modal.msgError(`文件类型只能为jpg格式/png格式`);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|