refactor(品牌工具页): 历史轮询抽为 useHistoryPolling

QueryAsin / Withdraw / PatrolDelete 三页逐字相同的 startHistoryPolling /
stopHistoryPolling 收敛为 shared/composables/useHistoryPolling:定时器走各页
categorized-timers(category 固定 history-poll),间隔默认主轮询的 2 倍。
categorized-timers 补 CategorizedTimers 类型导出;补注入式假定时器单测 5 例。

净减约 40 行;vue-tsc 构建与 695 个前端单测通过。
This commit is contained in:
2026-09-13 23:22:49 +08:00
parent 882ccdac12
commit dc6e8924a9
13 changed files with 685 additions and 84 deletions
@@ -105,6 +105,8 @@ export function createCategorizedTimers(scope: string) {
}
}
export type CategorizedTimers = ReturnType<typeof createCategorizedTimers>
export function getCategorizedTimerStats() {
return Array.from(timerBuckets.entries()).map(([category, bucket]) => ({
category,