perf(frontend): 管理页面更新操作改为局部刷新,避免全量重载列表

Provider、API Key、Pool Key、Management Token 的更新操作
完成后直接替换本地列表中对应记录,仅创建操作保留全量刷新。
This commit is contained in:
fawney19
2026-03-01 11:57:09 +08:00
parent b61fc4eb6b
commit 8b0e92e408
5 changed files with 47 additions and 11 deletions
+5 -1
View File
@@ -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))
}