iter(g113): 吸顶容器支持贴底固定

This commit is contained in:
HIsheR
2026-10-26 14:06:32 +08:00
parent 5c25e88c98
commit ec7aaf0a7d
6 changed files with 34 additions and 8 deletions
+8 -2
View File
@@ -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"
]
},
{