修复小区背景颜色,巡检点顺序一致,投诉处理按钮
This commit is contained in:
@@ -113,6 +113,7 @@
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:on-exceed="handleExceed"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:on-error="handleError"
|
||||
:limit="1"
|
||||
>
|
||||
@@ -310,7 +311,15 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
|
||||
const handleError: UploadProps['onError'] = (error: Error) => {
|
||||
console.log(error);
|
||||
};
|
||||
|
||||
const allowImgSuffix = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'heic'];
|
||||
/** 检测文件大小和格式 */
|
||||
const handleBeforeUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) => {
|
||||
if (!allowImgSuffix.includes(rawFile.name.split('.')[1])) {
|
||||
ElMessage.error('文件类型错误,请重新上传');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
// ! 投诉 ====================================================================================================
|
||||
|
||||
// ! 签到 =======================================
|
||||
|
||||
Reference in New Issue
Block a user