From 40a75dae3182cb55b30a2e8093c5eed82465f59c Mon Sep 17 00:00:00 2001 From: LiuHao <liuhaoai545@gmail.com> Date: 星期一, 15 四月 2024 10:40:33 +0800 Subject: [PATCH] fix 修复代码缩进. --- src/views/system/oss/index.vue | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/views/system/oss/index.vue b/src/views/system/oss/index.vue index 1cc582e..77c5dcd 100644 --- a/src/views/system/oss/index.vue +++ b/src/views/system/oss/index.vue @@ -197,11 +197,10 @@ loading.value = false; 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())); } /** 鍙栨秷鎸夐挳 */ function cancel() { -- Gitblit v1.9.3