You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
802 B
24 lines
802 B
9 years ago
|
---
|
||
|
category: Components
|
||
|
chinese: 固钉
|
||
9 years ago
|
type: Other
|
||
9 years ago
|
english: Affix
|
||
|
---
|
||
9 years ago
|
|
||
9 years ago
|
将页面元素钉在可视范围。
|
||
|
|
||
|
## 何时使用
|
||
|
|
||
|
当内容区域比较长,需要滚动页面时,这部分内容对应的操作或者导航需要在滚动范围内始终展现。常用于侧边菜单和按钮组合。
|
||
|
|
||
|
页面可视范围过小时,慎用此功能以免遮挡页面内容。
|
||
|
|
||
9 years ago
|
## API
|
||
|
|
||
|
|
||
|
| 成员 | 说明 | 类型 | 默认值 |
|
||
|
|-------------|----------------|--------------------|--------------|
|
||
9 years ago
|
| offsetTop | 距离窗口顶部达到指定偏移量后触发 | Number | |
|
||
|
| offsetBottom | 距离窗口底部达到指定偏移量后触发 | Number | |
|
||
9 years ago
|
| onChange | 固定状态改变时触发的回调函数 | Function(affixed) | 无 |
|