mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-04 00:32:26 +08:00
refactor(frontend): 补充优化剩余组件
- 优化 TooltipContent 组件 - 改进 ModelsTab 和 UserModelDetailDrawer 组件
This commit is contained in:
@@ -370,7 +370,7 @@ const props = defineProps<Props>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:open': [value: boolean]
|
||||
'toggle-capability': [modelName: string, capName: string]
|
||||
'toggleCapability': [modelName: string, capName: string]
|
||||
}>()
|
||||
|
||||
const { success: showSuccess, error: showError } = useToast()
|
||||
@@ -383,12 +383,6 @@ interface Props {
|
||||
modelCapabilitySettings?: Record<string, Record<string, boolean>>
|
||||
}
|
||||
|
||||
// 根据能力名称获取显示名称
|
||||
function getCapabilityDisplayName(capName: string): string {
|
||||
const cap = props.capabilities?.find(c => c.name === capName)
|
||||
return cap?.display_name || capName
|
||||
}
|
||||
|
||||
// 获取模型支持的用户可配置能力
|
||||
function getModelUserConfigurableCapabilities(): CapabilityDefinition[] {
|
||||
if (!props.model?.supported_capabilities || !props.userConfigurableCapabilities) return []
|
||||
@@ -406,7 +400,7 @@ function isCapabilityEnabled(capName: string): boolean {
|
||||
// 切换能力
|
||||
function handleToggleCapability(capName: string) {
|
||||
if (!props.model) return
|
||||
emit('toggle-capability', props.model.name, capName)
|
||||
emit('toggleCapability', props.model.name, capName)
|
||||
}
|
||||
|
||||
function handleClose() {
|
||||
|
||||
Reference in New Issue
Block a user