Pre Merge pull request !85 from 北桥/ts

This commit is contained in:
北桥 2024-02-02 05:39:43 +00:00 committed by Gitee
commit ea3fc1799e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -201,11 +201,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() {