修复文件预览大写后缀不展示的问题
This commit is contained in:
parent
81bfda2564
commit
91c843f098
@ -214,11 +214,10 @@ const getList = async () => {
|
||||
showTable.value = true;
|
||||
};
|
||||
|
||||
function checkFileSuffix(fileSuffix: string[]) {
|
||||
let arr = ['png', 'jpg', 'jpeg'];
|
||||
return arr.some((type) => {
|
||||
return fileSuffix.indexOf(type) > -1;
|
||||
});
|
||||
function checkFileSuffix(fileSuffix: string | string[]) {
|
||||
const arr = [".png", ".jpg", ".jpeg"];
|
||||
const suffixArray = Array.isArray(fileSuffix) ? fileSuffix : [fileSuffix];
|
||||
return suffixArray.some(suffix => arr.includes(suffix.toLowerCase()));
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
|
Loading…
Reference in New Issue
Block a user