From 4cd0f2367be66f63b48ab19d5cc3d1ce6729cf12 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Sat, 23 May 2026 10:57:36 +0800 Subject: [PATCH] fix(grid): remove unused search memo key function and computed property --- apps/desktop/src/components/grid/DataGrid.vue | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue index fd8e86a637..c8532073ab 100644 --- a/apps/desktop/src/components/grid/DataGrid.vue +++ b/apps/desktop/src/components/grid/DataGrid.vue @@ -1632,24 +1632,6 @@ const searchMatchSet = computed(() => { return set; }); -const searchRowMemoKeys = computed(() => { - const rows = new Map(); - for (const match of searchMatches.value) { - const row = rows.get(match.displayRow) ?? []; - row.push(String(match.col)); - rows.set(match.displayRow, row); - } - - const current = searchMatches.value[currentMatchIndex.value]; - if (current) { - const row = rows.get(current.displayRow) ?? []; - row.push(`current:${current.col}`); - rows.set(current.displayRow, row); - } - - return new Map([...rows].map(([row, parts]) => [row, parts.join("|")])); -}); - watch(searchMatches, (matches) => { currentMatchIndex.value = matches.length > 0 ? 0 : -1; }); @@ -1665,10 +1647,6 @@ function cellIsCurrentMatch(displayRow: number, col: number): boolean { return m.displayRow === displayRow && m.col === col; } -function rowSearchMemoKey(index: number): string { - return searchRowMemoKeys.value.get(index) ?? ""; -} - function navigateMatch(delta: number) { const total = searchMatches.value.length; if (total === 0) return;