|
@@ -308,7 +308,7 @@
|
|
return isJpgOrPng && isLt2M;
|
|
return isJpgOrPng && isLt2M;
|
|
}; //校验图片的格式
|
|
}; //校验图片的格式
|
|
function beforeRead(file) {
|
|
function beforeRead(file) {
|
|
- const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'video/mp4';
|
|
|
|
|
|
+ const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'video/mp4' || file.type === 'video/quicktime';
|
|
if (!isJpgOrPng) {
|
|
if (!isJpgOrPng) {
|
|
showToast(t('feedback.fileTips'));
|
|
showToast(t('feedback.fileTips'));
|
|
return false;
|
|
return false;
|
|
@@ -319,15 +319,14 @@
|
|
showToast(t('feedback.fileTips'));
|
|
showToast(t('feedback.fileTips'));
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- if (!isLt50M && file.type === 'video/mp4') {
|
|
|
|
|
|
+ if (!isLt50M && (file.type === 'video/mp4' || file.type === 'video/quicktime')) {
|
|
showToast(t('feedback.fileTips'));
|
|
showToast(t('feedback.fileTips'));
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- alert(/(jpg|jpeg|png|JPG|PNG|mp4)/i.test(file.type));
|
|
|
|
- if (!/(jpg|jpeg|png|JPG|PNG|mp4)/i.test(file.type)) {
|
|
|
|
- showToast(t('feedback.upload'));
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
|
|
+ // if (!/(jpg|jpeg|png|JPG|PNG|mp4|quicktime)/i.test(file.type)) {
|
|
|
|
+ // showToast(t('feedback.fileTips'));
|
|
|
|
+ // return false;
|
|
|
|
+ // }
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
function validator(value, rule) {
|
|
function validator(value, rule) {
|