From f46a33377803967a6ea3d19e017ff54a9374adce Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期三, 13 三月 2024 21:29:31 +0800 Subject: [PATCH] !89 【轻量级 PR】:update 调整导入模型选择流程类别方式(改为表单内下拉框) Merge pull request !89 from 愿丶/N/A --- 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