feat(layout): 侧边栏bug修复

v3.2
tanlianwang 2026-03-04 15:06:22 +08:00
parent 03bb2d8906
commit 6163f06a64
3 changed files with 29 additions and 8 deletions

View File

@ -1,12 +1,14 @@
<template>
<div class="app-layout">
<div class="app-main" :class="user.isExpire() ? 'isExpire' : ''">
<layout-container>
<template #left>
<Sidebar />
</template>
<div class="app-main" :class="user.isExpire() ? 'isExpire' : ''" style="display: flex;">
<!-- 最左侧侧边栏 -->
<div style="width: 240px; border-right: 1px solid #e5e7eb;">
<Sidebar />
</div>
<!-- 主内容区 -->
<div style="flex: 1; overflow: hidden;">
<AppMain />
</layout-container>
</div>
</div>
</div>
</template>

View File

@ -78,7 +78,16 @@ const checkModelType = (model_type: string) => {
selectModelType.value = model_type
currentModelType.value = modelTypeOptions.filter((item) => item.value === model_type)[0].text
ProviderApi.getProviderByModelType(model_type, loading).then((ok) => {
list_provider.value = ok.data
//
const excludedProviders = [
'Anthropic',
'Amazon Bedrock',
'Gemini',
'SILICONFLOW',
'Xorbits Inference',
'Regolo'
]
list_provider.value = ok.data.filter(provider => !excludedProviders.includes(provider.name))
list_provider.value.sort((a, b) => a.provider.localeCompare(b.provider))
})
}

View File

@ -219,8 +219,18 @@ const search_type_change = () => {
onMounted(() => {
model.asyncGetProvider(loading).then((ok: any) => {
//
const excludedProviders = [
'Anthropic',
'Amazon Bedrock',
'Gemini',
'SILICONFLOW',
'Xorbits Inference',
'Regolo'
]
const filteredProviders = ok.data.filter((provider: any) => !excludedProviders.includes(provider.name))
active_provider.value = allObj
provider_list.value = [allObj, ...ok.data]
provider_list.value = [allObj, ...filteredProviders]
list_model()
})
})