mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +00:00
fix: 修复账户管理和API Key管理的多个问题
- 修复 Claude Console 账号 supportedModels 导致的 be.join 错误 - 添加专属账号选择器组件,支持搜索和按创建时间倒序排序 - 修复搜索框图标与placeholder文字重叠的问题 - 修复选择共享账号池后显示文字不正确的问题 - 优化下拉框定位逻辑,解决超出视窗无法滚动的问题 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -870,7 +870,19 @@ const form = ref({
|
||||
apiUrl: props.account?.apiUrl || '',
|
||||
apiKey: props.account?.apiKey || '',
|
||||
priority: props.account?.priority || 50,
|
||||
supportedModels: props.account?.supportedModels?.join('\n') || '',
|
||||
supportedModels: (() => {
|
||||
const models = props.account?.supportedModels;
|
||||
if (!models) return '';
|
||||
// 处理对象格式(Claude Console 的新格式)
|
||||
if (typeof models === 'object' && !Array.isArray(models)) {
|
||||
return Object.keys(models).join('\n');
|
||||
}
|
||||
// 处理数组格式(向后兼容)
|
||||
if (Array.isArray(models)) {
|
||||
return models.join('\n');
|
||||
}
|
||||
return '';
|
||||
})(),
|
||||
userAgent: props.account?.userAgent || '',
|
||||
rateLimitDuration: props.account?.rateLimitDuration || 60
|
||||
})
|
||||
@@ -1362,7 +1374,19 @@ watch(() => props.account, (newAccount) => {
|
||||
apiUrl: newAccount.apiUrl || '',
|
||||
apiKey: '', // 编辑模式不显示现有的 API Key
|
||||
priority: newAccount.priority || 50,
|
||||
supportedModels: newAccount.supportedModels?.join('\n') || '',
|
||||
supportedModels: (() => {
|
||||
const models = newAccount.supportedModels;
|
||||
if (!models) return '';
|
||||
// 处理对象格式(Claude Console 的新格式)
|
||||
if (typeof models === 'object' && !Array.isArray(models)) {
|
||||
return Object.keys(models).join('\n');
|
||||
}
|
||||
// 处理数组格式(向后兼容)
|
||||
if (Array.isArray(models)) {
|
||||
return models.join('\n');
|
||||
}
|
||||
return '';
|
||||
})(),
|
||||
userAgent: newAccount.userAgent || '',
|
||||
rateLimitDuration: newAccount.rateLimitDuration || 60
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user