fix : 图片类型判断, 一体机modal样式
This commit is contained in:
@@ -470,7 +470,8 @@ function isImage(type) {
|
||||
'apng', 'avif', 'heic', 'heif', 'jfif'
|
||||
];
|
||||
const lowerType = type.toLowerCase();
|
||||
return imageTypes.includes(lowerType);
|
||||
|
||||
return imageTypes.some(item=>lowerType.includes(item))
|
||||
}
|
||||
|
||||
function isFile(type) {
|
||||
@@ -510,6 +511,7 @@ function uploadCamera(type = 'camera') {
|
||||
// 继续上传
|
||||
$api.uploadFile(tempFilePaths[0], true).then((resData) => {
|
||||
resData = JSON.parse(resData);
|
||||
console.log(file.type,'++')
|
||||
if (isImage(file.type)) {
|
||||
filesList.value.push({
|
||||
url: resData.msg,
|
||||
|
||||
Reference in New Issue
Block a user