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