mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 14:29:33 +08:00
26 lines
377 B
Markdown
26 lines
377 B
Markdown
---
|
|
order: 1
|
|
title:
|
|
zh-CN: 固定状态改变的回调
|
|
en-US: Callback
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
可以获得是否固定的状态。
|
|
|
|
## en-US
|
|
|
|
Callback with affixed state.
|
|
|
|
````__react
|
|
import { Affix, Button } from 'antd';
|
|
|
|
ReactDOM.render(
|
|
<Affix offsetTop={120} onChange={affixed => console.log(affixed)}>
|
|
<Button>120px to affix top</Button>
|
|
</Affix>,
|
|
mountNode
|
|
);
|
|
````
|