From a1c7509894be9c441535974f91f2e62ce251b01f Mon Sep 17 00:00:00 2001 From: argszero Date: Tue, 20 Oct 2026 13:49:44 +0800 Subject: [PATCH] docs(user-stories): name the table that has the table capabilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "数据表格支持列筛选、排序、分页、键盘导航与 CSV 导出" reads as a claim about every data table, but four of those five belong to one table: - `buildDataTable()` — which owns header sorting, column filters and the pager — has exactly one call site (`ui/js/app.js:1944`), the transaction table. The other six tables (`mk-body`, `share-body`, `api-keys`, `emp-body`, `dept-body`, `model-body`, `ops-body`) get a static header and row rendering only; they have a search box and nothing else. - CSV has exactly one writer (`exportTxCsv`, one `new Blob` in the repo) and one button (`#tx-export-btn`), and `ui/README.md:291` already titles that section "交易记录导出 CSV 约定". Keyboard navigation is the exception and is genuinely table-generic: `kbdTbodyOf(e.target)` resolves `closest("tbody")` with no roster, so ↑/↓, Enter and Esc work on any data table (`ui/README.md:317` lists them all). Keeping it inside the narrowed sentence would have swapped one misleading claim for another, so it moves to its own clause. Narrow the subject; leave the capabilities alone. No gate covers `docs/user-stories.md`. --- docs/user-stories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-stories.md b/docs/user-stories.md index cd6038a..cac0305 100644 --- a/docs/user-stories.md +++ b/docs/user-stories.md @@ -42,7 +42,7 @@ ## 4. UI 约定 - **尽量少用弹窗**:操作反馈用 toast,复杂表单用内联区域 -- 数据表格支持列筛选、排序、分页、键盘导航与 CSV 导出 +- **交易记录表**支持列筛选、排序、分页与 CSV 导出;键盘导航(↑/↓ 选行、Enter 主操作、Esc 清除)对任意数据表生效 - 登录态绝不 fallback 到 mock 数据——加载失败显示空态 + 重试 ## 5. 规划(未实现)