mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-10 11:19:50 +08:00
style: 统一模型映射对话框样式与批量管理模型对话框一致
- 搜索栏移到边框外,高度统一为 h-9 - 徽章高度改为 h-7,圆角改为 rounded-md - 分组标题样式统一为 px-3 py-2 bg-muted - 添加刷新按钮,未加载时显示闪电图标,已加载时显示刷新图标 - 仅在有 key 配置了自动获取时才自动请求上游模型
This commit is contained in:
@@ -296,6 +296,7 @@
|
||||
:models="models"
|
||||
:editing-group="editingGroup"
|
||||
:preselected-model-id="preselectedModelId"
|
||||
:has-auto-fetch-key="hasAutoFetchKey"
|
||||
@saved="onDialogSaved"
|
||||
/>
|
||||
|
||||
@@ -362,6 +363,7 @@ interface CombinedMapping {
|
||||
|
||||
const props = defineProps<{
|
||||
provider: any
|
||||
providerKeys?: EndpointAPIKey[]
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -393,6 +395,12 @@ const formatMenuOpen = ref<Record<string, boolean>>({})
|
||||
// 展开状态
|
||||
const expandedItems = ref<Set<number>>(new Set())
|
||||
|
||||
// 是否有 key 配置了自动获取上游模型
|
||||
const hasAutoFetchKey = computed(() => {
|
||||
const keys = props.providerKeys || providerKeys.value
|
||||
return keys.some(k => k.auto_fetch_models)
|
||||
})
|
||||
|
||||
// 生成作用域唯一键
|
||||
function getApiFormatsKey(formats: string[] | undefined): string {
|
||||
if (!formats || formats.length === 0) return ''
|
||||
|
||||
Reference in New Issue
Block a user