feat(breadcrumb): 支持 onNavigate 接管点击(SPA 路由)

- 可选 prop,不传时保持普通链接
- 文档契约 + props 表 + 变更记录同步
This commit is contained in:
stash
2026-10-29 11:26:20 +08:00
parent 52296b3368
commit 12e3047f1a
3 changed files with 26 additions and 6 deletions
+3 -2
View File
@@ -410,8 +410,8 @@
### 3.26 Breadcrumb ✅
- **用途**:详情页路径导航。
- **Props**:`items: { label, href? }[]`、`separator`(默认 `/`)。
- **规则**:最后一项忽略 `href`,并标 `aria-current="page"`。
- **Props**:`items: { label, href? }[]`、`separator`(默认 `/`)、`onNavigate(href)`(接管点击,用于 SPA 路由;传了就阻止默认跳转)。
- **规则**:最后一项忽略 `href`,并标 `aria-current="page"`;不传 `onNavigate` 时走普通链接(整页跳转)。
- **展示页**:`#breadcrumb`
### 3.27 Tabs ✅
@@ -666,3 +666,4 @@
| 2026-10-28 | **1:1 补全(视觉 + 交互)**:`Title` 增加 `weight`(600);`Input` 增加 `size`(44);`Button` 增加 `spinning`(图标原地旋转);`Cover` 改为 hover 上浮 2px(`lift`,默认开;`hoverZoom` 默认关);`ScrollTop` 增加 `offset`;`Menu` 的 hover 改主色、子菜单改 `grid-template-rows` 高度动画(0.28s);`Avatar xl` 徽标 20px、无图底色用新令牌 `--su-avatar-gradient`。**影响面**:`Cover`/`Menu`/`Avatar`/`Title` 的所有展示页 demo 与应用页面需重截图 |
| 2026-10-28 | **修复**:`Input` 聚焦不再叠 outline(文本框点击会命中 `:focus-visible`,导致边框 + 外环「双框」;现在只用边框变主色)。`Layout` 增加 `hideScrollbar`(内部滚动条可隐藏)。影响面:所有 `Input` 页面视觉(去掉了多余外环)、`Layout screen` 页面可选用 |
| 2026-10-28 | **补齐剩余能力**:新增 `Image`(比例 / 填充 / 失败降级)与 `FormField`(标签 + 提示 + 错误,不做校验);`Button` 增加 `size="lg"`(44);展示页补 `Title weight`、`Avatar xl/tone/icon`、`Cover lift`、`Menu itemHeight`、`Layout screen/hideScrollbar`、`Input size`、`FormField` 示例;新增 `themes/example.css` 主题示例(只改变量) |
| 2026-10-29 | `Breadcrumb` 增加 `onNavigate`(可选):传了就用 `preventDefault` 接管点击,交给 SPA 路由;不传保持普通链接。兼容性:新增可选 prop,无破坏性 |