mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复上传文档后缀大小写问题
This commit is contained in:
parent
a755a37a44
commit
b21a7c0498
|
|
@ -45,7 +45,7 @@ const typeList: any = {
|
|||
export function getImgUrl(name: string) {
|
||||
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
|
||||
}
|
||||
// 是否是白名单后缀
|
||||
|
|
|
|||
|
|
@ -50,10 +50,12 @@
|
|||
<div class="flex align-center">
|
||||
<span
|
||||
v-html="relatedObject(providerOptions, label, 'provider')?.icon"
|
||||
class="model-icon mr-8"
|
||||
class="model-icon mr-8" style="margin-top: 10px;"
|
||||
></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>
|
||||
<el-icon class="check-icon" v-if="item.id === form.embedding_mode_id"
|
||||
><Check
|
||||
|
|
@ -68,10 +70,10 @@
|
|||
class="flex-between"
|
||||
disabled
|
||||
>
|
||||
<div class="flex">
|
||||
<div class="flex align-center">
|
||||
<span
|
||||
v-html="relatedObject(providerOptions, label, 'provider')?.icon"
|
||||
class="model-icon mr-8"
|
||||
class="model-icon mr-8 mt-8"
|
||||
></span>
|
||||
<span>{{ item.name }}</span>
|
||||
<span class="danger">{{
|
||||
|
|
|
|||
Loading…
Reference in New Issue