iter(g113): 吸顶容器支持贴底固定
This commit is contained in:
@@ -1260,6 +1260,14 @@
|
||||
"acceptance": "ToastProps 新增 actionLabel 与 onAction:传了文案才渲染操作按钮(accent 色、hover 下划线、focus-visible 有环),点后先收起再回调;带操作按钮的 toast 接收指针事件(原来只有 closable 才接收),悬停暂停逻辑不变;文档参数表 / 手把手 / api 说明与演示(「带撤销」按钮,5s)同步;npm run check 全绿",
|
||||
"notes": "自补:可用性;沿用现有 dismiss,不新增公开 API",
|
||||
"status": "done"
|
||||
},
|
||||
{
|
||||
"id": "g113",
|
||||
"title": "吸顶容器支持贴底固定",
|
||||
"motivation": "底部操作条(保存 / 取消 / 合计金额)是长表单与详情页的刚需,affix 只会贴顶:调用方得自己监听滚动改 position,或者干脆让操作条跟着内容滚走,用户翻到表单底部才发现按钮在屏幕外",
|
||||
"acceptance": "AffixProps 新增 position(top 缺省 / bottom):贴底时占位容器底边越过「视口底 - offset」才固定,内联边距写 bottom 并清空 top,取消固定时两边都还原;贴顶行为不变;文档参数表 / 手把手 / api 说明同步;npm run check 全绿",
|
||||
"notes": "自补:组件可用性;只在 sync 里加一条判定与一个样式分支",
|
||||
"status": "open"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+8
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "ui-arch-registry-index/0.1",
|
||||
"generatedAt": "2026-10-26T06:05:26.104Z",
|
||||
"generatedAt": "2026-10-26T06:06:20.403Z",
|
||||
"repoRoot": ".",
|
||||
"packages": [
|
||||
{
|
||||
@@ -2813,6 +2813,11 @@
|
||||
"t": "number",
|
||||
"d": "距视口顶部多少像素后转为固定;缺省 0"
|
||||
},
|
||||
{
|
||||
"n": "position",
|
||||
"t": "'top' | 'bottom'",
|
||||
"d": "固定边:贴顶放头部工具栏,贴底放底部操作条;缺省 top"
|
||||
},
|
||||
{
|
||||
"n": "target",
|
||||
"t": "HTMLElement | Window",
|
||||
@@ -2829,7 +2834,8 @@
|
||||
"把要贴住的内容作为实参传入;组件内部包两层:外层占位、内层负责 fixed",
|
||||
"滚动到 offset 以内(默认贴视口顶)时内层转 fixed,外层同步撑出等高占位,页面不会塌跳",
|
||||
"固定期间宽度与横向位置跟随占位容器,窗口缩放或父容器变宽都自动贴合",
|
||||
"内滚容器场景把该元素传给 target,判定改为基于它的滚动位置"
|
||||
"内滚容器场景把该元素传给 target,判定改为基于它的滚动位置",
|
||||
"底部操作条传 position: 'bottom':占位容器底边越过「视口底 - offset」时才固定,对应的内联边距写 bottom"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user