|
|
|
@ -731,7 +731,7 @@ const initOriginWarehouseOrder = async () => {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 上传前类型检测 */ |
|
|
|
|
const handleBeforeUpload = async (rawFile: UploadRawFile) => { |
|
|
|
|
const handleBeforeUpload = async rawFile => { |
|
|
|
|
console.log('rawFile :>> ', rawFile); |
|
|
|
|
const _nameArr = rawFile.name.split('.'); |
|
|
|
|
|
|
|
|
@ -744,8 +744,10 @@ const handleBeforeUpload = async (rawFile: UploadRawFile) => {
|
|
|
|
|
|
|
|
|
|
const _whiteArr = ['png', 'jpg', 'jpeg']; |
|
|
|
|
|
|
|
|
|
if (!_whiteArr.includes(_name.toLocaleLowerCase())) |
|
|
|
|
return ElMessage.warning('请上传png、jpg、jpeg的类型图片'); |
|
|
|
|
if (!_whiteArr.includes(_name.toLocaleLowerCase())) { |
|
|
|
|
ElMessage.warning('请上传png、jpg、jpeg的类型图片'); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const res = await compressImageBlob(rawFile); |
|
|
|
|
return res; |
|
|
|
|