mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-04 16:37:46 +08:00
perf(frontend): 管理页面更新操作改为局部刷新,避免全量重载列表
Provider、API Key、Pool Key、Management Token 的更新操作 完成后直接替换本地列表中对应记录,仅创建操作保留全量刷新。
This commit is contained in:
@@ -912,7 +912,11 @@ async function toggleKeyActive(key: PoolKeyDetail) {
|
||||
key_ids: [key.key_id],
|
||||
action,
|
||||
})
|
||||
await loadKeys()
|
||||
// 局部更新:直接修改本地列表中的状态
|
||||
const target = keyPage.value.keys.find(k => k.key_id === key.key_id)
|
||||
if (target) {
|
||||
target.is_active = !target.is_active
|
||||
}
|
||||
} catch (err) {
|
||||
showError(parseApiError(err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user