fix: 修复上传文档后缀大小写问题

This commit is contained in:
wangdan-fit2cloud 2024-08-28 19:17:47 +08:00
parent a755a37a44
commit b21a7c0498
2 changed files with 7 additions and 5 deletions

View File

@ -45,7 +45,7 @@ const typeList: any = {
export function getImgUrl(name: string) { export function getImgUrl(name: string) {
const list = Object.values(typeList).flat() const list = Object.values(typeList).flat()
const type = list.includes(fileType(name)) ? fileType(name) : 'unknow' const type = list.includes(fileType(name.toLowerCase())) ? fileType(name.toLowerCase()) : 'unknow'
return new URL(`../assets/${type}-icon.svg`, import.meta.url).href return new URL(`../assets/${type}-icon.svg`, import.meta.url).href
} }
// 是否是白名单后缀 // 是否是白名单后缀

View File

@ -50,10 +50,12 @@
<div class="flex align-center"> <div class="flex align-center">
<span <span
v-html="relatedObject(providerOptions, label, 'provider')?.icon" v-html="relatedObject(providerOptions, label, 'provider')?.icon"
class="model-icon mr-8" class="model-icon mr-8" style="margin-top: 10px;"
></span> ></span>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<el-tag v-if="item.permission_type === 'PUBLIC'" type="info" class="info-tag ml-8">公用</el-tag> <el-tag v-if="item.permission_type === 'PUBLIC'" type="info" class="info-tag ml-8"
>公用</el-tag
>
</div> </div>
<el-icon class="check-icon" v-if="item.id === form.embedding_mode_id" <el-icon class="check-icon" v-if="item.id === form.embedding_mode_id"
><Check ><Check
@ -68,10 +70,10 @@
class="flex-between" class="flex-between"
disabled disabled
> >
<div class="flex"> <div class="flex align-center">
<span <span
v-html="relatedObject(providerOptions, label, 'provider')?.icon" v-html="relatedObject(providerOptions, label, 'provider')?.icon"
class="model-icon mr-8" class="model-icon mr-8 mt-8"
></span> ></span>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<span class="danger">{{ <span class="danger">{{