perf(提交列表): 按 ↑ ↓ 换到没看过的一条也不卡了 —— 右栏预取上一条、下一条
Deploy / deploy (push) Successful in 48s

原来换到没缓存的一条要先卸掉代码区、转圈、再整个挂回来,CPU 降速 6 倍下每次卡
60–100ms;走缓存的只换内容不卡。现在这一条加载完顺手把上下两条也拉回来,同一条
只发一次请求(预取还在路上时按到它就接着等),按住 ↓ 划过去的那些行不预取。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-11-03 13:57:34 +08:00
1 parent e511d82f3b
commit 95dc2f24e6
3 files changed
+52 -4

No files matched your search

+3 -1
View File
@@ -263,7 +263,7 @@ watch(
// ==================== 选中与翻阅 ====================
const { selectedId, selectedRow, position, maxPage, select, move, settleSelection, forgetJump } = useRowCursor({
const { selectedId, selectedRow, position, neighbors, maxPage, select, move, settleSelection, forgetJump } = useRowCursor({
rows,
total,
query,
@@ -858,6 +858,7 @@ function dayBreak(index: number) {
<SubmissionPane
v-else
:row="selectedRow as SubmissionListItem"
:neighbors="neighbors as SubmissionListItem[]"
:teacher="teacher"
:class-name="query.className"
:contest="inContest"
@@ -893,6 +894,7 @@ function dayBreak(index: number) {
<SubmissionPane
v-else
:row="selectedRow as SubmissionListItem"
:neighbors="neighbors as SubmissionListItem[]"
:teacher="teacher"
:class-name="query.className"
:contest="inContest"