fix(admin-spa): 修复版本号显示位置,使其与网站名称在同一行显示

This commit is contained in:
shaw
2025-07-29 17:01:19 +08:00
parent 514d2f5377
commit a11e3909e0
4 changed files with 29 additions and 36 deletions

View File

@@ -556,17 +556,13 @@ const createApiKey = async () => {
tags: form.tags.length > 0 ? form.tags : undefined
}
// 模型限制
// 模型限制 - 始终提交这些字段
data.enableModelRestriction = form.enableModelRestriction
if (form.enableModelRestriction && form.restrictedModels.length > 0) {
data.restrictedModels = form.restrictedModels
}
data.restrictedModels = form.restrictedModels
// 客户端限制
// 客户端限制 - 始终提交这些字段
data.enableClientRestriction = form.enableClientRestriction
if (form.enableClientRestriction && form.allowedClients.length > 0) {
data.allowedClients = form.allowedClients
}
data.allowedClients = form.allowedClients
const result = await apiClient.post('/admin/api-keys', data)

View File

@@ -446,21 +446,13 @@ const updateApiKey = async () => {
tags: form.tags
}
// 模型限制
// 模型限制 - 始终提交这些字段
data.enableModelRestriction = form.enableModelRestriction
if (form.enableModelRestriction && form.restrictedModels.length > 0) {
data.restrictedModels = form.restrictedModels
} else {
data.restrictedModels = []
}
data.restrictedModels = form.restrictedModels
// 客户端限制
// 客户端限制 - 始终提交这些字段
data.enableClientRestriction = form.enableClientRestriction
if (form.enableClientRestriction && form.allowedClients.length > 0) {
data.allowedClients = form.allowedClients
} else {
data.allowedClients = []
}
data.allowedClients = form.allowedClients
const result = await apiClient.put(`/admin/api-keys/${props.apiKey.id}`, data)