From 9c6c6e1784056b8ce16b078a308778208ae22a98 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Thu, 6 Aug 2026 03:47:19 -0600 Subject: [PATCH] fix(reaction): dedupe sort request when not on page 1 handleSorter previously mutated query.page then called listStats() synchronously, while a separate page/limit watcher also fired on the page reset, producing two identical requests whenever sorting was triggered from page 2+. ordering is now part of the watched sources so page+ordering mutations from handleSorter batch into a single watcher run. Co-Authored-By: Claude Opus 5 --- src/admin/communication/reactions.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/admin/communication/reactions.vue b/src/admin/communication/reactions.vue index 7e98094..bf3ddac 100644 --- a/src/admin/communication/reactions.vue +++ b/src/admin/communication/reactions.vue @@ -80,7 +80,6 @@ function handleSorter(sorter: { columnKey: string; order: string | false }) { (sorter.order === "descend" ? "-" : "") + String(sorter.columnKey) } query.page = 1 - listStats() } async function listStats() { @@ -96,7 +95,7 @@ async function listStats() { } onMounted(listStats) -watch(() => [query.page, query.limit], listStats) +watch(() => [query.page, query.limit, query.ordering], listStats) watchDebounced(() => query.problem, listStats, { debounce: 500, maxWait: 1000,